CMakeLists.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. # Determines what CMake APIs we can rely on
  2. cmake_minimum_required (VERSION 2.8.11)
  3. if (${CMAKE_VERSION} VERSION_GREATER 3.2.2)
  4. cmake_policy(VERSION 3.2.2)
  5. endif()
  6. if (${CMAKE_VERSION} VERSION_GREATER 3.1 OR
  7. ${CMAKE_VERSION} VERSION_EQUAL 3.1)
  8. cmake_policy(SET CMP0054 NEW)
  9. endif()
  10. # Do not allow in source builds
  11. set(CMAKE_DISABLE_SOURCE_CHANGES ON)
  12. set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
  13. # Make sure we can import out CMake functions
  14. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
  15. # Load in the needed CMake modules
  16. include(CheckCCompilerFlag)
  17. include(CheckCXXCompilerFlag)
  18. include(AddCCompilerFlag)
  19. include(AddCXXCompilerFlag)
  20. include(DetermineTargetArchitecture)
  21. include(CMakeDependentOption)
  22. # Set up the project
  23. project (civetweb)
  24. set(CIVETWEB_VERSION "1.7.0" CACHE STRING "The version of the civetweb library")
  25. string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" CIVETWEB_VERSION_MATCH "${CIVETWEB_VERSION}")
  26. if ("${CIVETWEB_VERSION_MATCH}" STREQUAL "")
  27. message(FATAL_ERROR "Must specify a semantic version: major.minor.patch")
  28. endif()
  29. set(CIVETWEB_VERSION_MAJOR "${CMAKE_MATCH_1}")
  30. set(CIVETWEB_VERSION_MINOR "${CMAKE_MATCH_2}")
  31. set(CIVETWEB_VERSION_PATCH "${CMAKE_MATCH_3}")
  32. determine_target_architecture(CIVETWEB_ARCHITECTURE)
  33. # Detect the platform reliably
  34. if(NOT MACOSX AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  35. SET(DARWIN YES)
  36. elseif(NOT BSD AND ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
  37. SET(FREEBSD YES)
  38. elseif(NOT LINUX AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  39. SET(LINUX YES)
  40. endif()
  41. # C++ wrappers
  42. option(CIVETWEB_ENABLE_THIRD_PARTY_OUTPUT "Shows the output of third party dependency processing" OFF)
  43. # Max Request Size
  44. set(CIVETWEB_MAX_REQUEST_SIZE 16384 CACHE STRING
  45. "The largest amount of content bytes allowed in a request")
  46. set_property(CACHE CIVETWEB_MAX_REQUEST_SIZE PROPERTY VALUE ${CIVETWEB_MAX_REQUEST_SIZE})
  47. message(STATUS "Max Request Size - ${CIVETWEB_MAX_REQUEST_SIZE}")
  48. # Thread Stack Size
  49. set(CIVETWEB_THREAD_STACK_SIZE 102400 CACHE STRING
  50. "The stack size in bytes for each thread created")
  51. set_property(CACHE CIVETWEB_THREAD_STACK_SIZE PROPERTY VALUE ${CIVETWEB_THREAD_STACK_SIZE})
  52. message(STATUS "Thread Stack Size - ${CIVETWEB_THREAD_STACK_SIZE}")
  53. # C++ wrappers
  54. option(CIVETWEB_ENABLE_CXX "Enables the C++ wrapper library" OFF)
  55. message(STATUS "C++ wrappers - ${CIVETWEB_ENABLE_CXX}")
  56. # IP Version 6
  57. option(CIVETWEB_ENABLE_IPV6 "Enables the IP version 6 support" OFF)
  58. message(STATUS "IP Version 6 - ${CIVETWEB_ENABLE_IPV6}")
  59. # Websocket support
  60. option(CIVETWEB_ENABLE_WEBSOCKETS "Enable websockets connections" OFF)
  61. message(STATUS "Websockets support - ${CIVETWEB_ENABLE_WEBSOCKETS}")
  62. # Memory debugging
  63. option(CIVETWEB_ENABLE_MEMORY_DEBUGGING "Enable the memory debugging features" OFF)
  64. message(STATUS "Memory Debugging - ${CIVETWEB_ENABLE_MEMORY_DEBUGGING}")
  65. # LUA CGI support
  66. option(CIVETWEB_ENABLE_LUA "Enable Lua CGIs" OFF)
  67. message(STATUS "Lua CGI support - ${CIVETWEB_ENABLE_LUA}")
  68. # Link to the shared LUA library
  69. cmake_dependent_option(
  70. CIVETWEB_ENABLE_LUA_SHARED "Link to the shared LUA system library" OFF
  71. CIVETWEB_ENABLE_LUA OFF)
  72. if (CIVETWEB_ENABLE_LUA)
  73. message(STATUS "Linking shared Lua library - ${CIVETWEB_ENABLE_LUA_SHARED}")
  74. endif()
  75. # Lua Third Party Settings
  76. if (CIVETWEB_ENABLE_LUA)
  77. if (NOT CIVETWEB_ENABLE_LUA_SHARED)
  78. # Lua Version
  79. set(CIVETWEB_LUA_VERSION 5.3.0 CACHE STRING
  80. "The version of Lua to build and include statically")
  81. set_property(CACHE CIVETWEB_LUA_VERSION PROPERTY VALUE ${CIVETWEB_LUA_VERSION})
  82. message(STATUS "Lua Version - ${CIVETWEB_LUA_VERSION}")
  83. mark_as_advanced(CIVETWEB_LUA_VERSION)
  84. # Lua Verification Hash
  85. set(CIVETWEB_LUA_MD5_HASH a1b0a7e92d0c85bbff7a8d27bf29f8af CACHE STRING
  86. "The hash of Lua archive to be downloaded")
  87. set_property(CACHE CIVETWEB_LUA_MD5_HASH PROPERTY VALUE ${CIVETWEB_LUA_MD5_HASH})
  88. mark_as_advanced(CIVETWEB_LUA_MD5_HASH)
  89. endif()
  90. # Lua Filesystem Version
  91. set(CIVETWEB_LUA_FILESYSTEM_VERSION 1.6.3 CACHE STRING
  92. "The version of Lua Filesystem to build and include statically")
  93. set_property(CACHE CIVETWEB_LUA_FILESYSTEM_VERSION PROPERTY VALUE ${CIVETWEB_LUA_FILESYSTEM_VERSION})
  94. message(STATUS "Lua Filesystem Version - ${CIVETWEB_LUA_FILESYSTEM_VERSION}")
  95. mark_as_advanced(CIVETWEB_LUA_FILESYSTEM_VERSION)
  96. # Lua Filesystem Verification Hash
  97. set(CIVETWEB_LUA_FILESYSTEM_MD5_HASH d0552c7e5a082f5bb2865af63fb9dc95 CACHE STRING
  98. "The hash of Lua Filesystem archive to be downloaded")
  99. set_property(CACHE CIVETWEB_LUA_FILESYSTEM_MD5_HASH PROPERTY VALUE ${CIVETWEB_LUA_FILESYSTEM_MD5_HASH})
  100. mark_as_advanced(CIVETWEB_LUA_FILESYSTEM_MD5_HASH)
  101. # Lua SQLite Version
  102. set(CIVETWEB_LUA_SQLITE_VERSION 0.9.3 CACHE STRING
  103. "The version of Lua SQLite to build and include statically")
  104. set_property(CACHE CIVETWEB_LUA_SQLITE_VERSION PROPERTY VALUE ${CIVETWEB_LUA_SQLITE_VERSION})
  105. message(STATUS "Lua SQLite Version - ${CIVETWEB_LUA_SQLITE_VERSION}")
  106. mark_as_advanced(CIVETWEB_LUA_SQLITE_VERSION)
  107. # Lua SQLite Verification Hash
  108. set(CIVETWEB_LUA_SQLITE_MD5_HASH 43234ae08197dfce6da02482ed14ec92 CACHE STRING
  109. "The hash of Lua SQLite archive to be downloaded")
  110. set_property(CACHE CIVETWEB_LUA_SQLITE_MD5_HASH PROPERTY VALUE ${CIVETWEB_LUA_SQLITE_MD5_HASH})
  111. mark_as_advanced(CIVETWEB_LUA_SQLITE_MD5_HASH)
  112. # Lua XML Version
  113. set(CIVETWEB_LUA_XML_VERSION 1.8.0 CACHE STRING
  114. "The version of Lua XML to build and include statically")
  115. set_property(CACHE CIVETWEB_LUA_XML_VERSION PROPERTY VALUE ${CIVETWEB_LUA_XML_VERSION})
  116. message(STATUS "Lua XML Version - ${CIVETWEB_LUA_XML_VERSION}")
  117. mark_as_advanced(CIVETWEB_LUA_XML_VERSION)
  118. # Lua XML Verification Hash
  119. set(CIVETWEB_LUA_XML_MD5_HASH 25e4c276c5d8716af1de0c7853aec2b4 CACHE STRING
  120. "The hash of Lua XML archive to be downloaded")
  121. set_property(CACHE CIVETWEB_LUA_XML_MD5_HASH PROPERTY VALUE ${CIVETWEB_LUA_XML_MD5_HASH})
  122. mark_as_advanced(CIVETWEB_LUA_XML_MD5_HASH)
  123. # SQLite Version
  124. set(CIVETWEB_SQLITE_VERSION 3.8.9 CACHE STRING
  125. "The version of SQLite to build and include statically")
  126. set_property(CACHE CIVETWEB_SQLITE_VERSION PROPERTY VALUE ${CIVETWEB_SQLITE_VERSION})
  127. message(STATUS "SQLite Version - ${CIVETWEB_SQLITE_VERSION}")
  128. mark_as_advanced(CIVETWEB_SQLITE_VERSION)
  129. # SQLite Verification Hash
  130. set(CIVETWEB_SQLITE_MD5_HASH 02e9c3a6daa8b8587cf6bef828c2e33f CACHE STRING
  131. "The hash of SQLite archive to be downloaded")
  132. set_property(CACHE CIVETWEB_SQLITE_MD5_HASH PROPERTY VALUE ${CIVETWEB_SQLITE_MD5_HASH})
  133. mark_as_advanced(CIVETWEB_SQLITE_MD5_HASH)
  134. endif()
  135. # SSL support
  136. option(CIVETWEB_ENABLE_SSL "Enables the secure socket layer" ON)
  137. message(STATUS "SSL support - ${CIVETWEB_ENABLE_SSL}")
  138. # Dynamically load or link the SSL libraries
  139. cmake_dependent_option(
  140. CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING "Dynamically loads the SSL library rather than linking it" ON
  141. CIVETWEB_ENABLE_SSL OFF)
  142. if (CIVETWEB_ENABLE_SSL)
  143. message(STATUS "Dynamically load SSL libraries - ${CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING}")
  144. endif()
  145. # Unix systems can define the dynamic library names to load
  146. if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING AND NOT DARWIN AND UNIX)
  147. # SSL library name
  148. set(CIVETWEB_SSL_SSL_LIB "libssl.so" CACHE STRING
  149. "The name of the SSL library to load")
  150. set_property(CACHE CIVETWEB_SSL_SSL_LIB PROPERTY VALUE ${CIVETWEB_SSL_SSL_LIB})
  151. message(STATUS "SSL Library Name - ${CIVETWEB_SSL_SSL_LIB}")
  152. # Crytography library name
  153. set(CIVETWEB_SSL_CRYPTO_LIB "libcrypto.so" CACHE STRING
  154. "The name of the SSL Cryptography library to load")
  155. set_property(CACHE CIVETWEB_SSL_CRYPTO_LIB PROPERTY VALUE ${CIVETWEB_SSL_CRYPTO_LIB})
  156. message(STATUS "SSL Cryptography Library Name - ${CIVETWEB_SSL_CRYPTO_LIB}")
  157. endif()
  158. # The C and C++ standards to use
  159. set(CIVETWEB_C_STANDARD auto CACHE STRING
  160. "The C standard to use; auto determines the latest supported by the compiler")
  161. set_property(CACHE CIVETWEB_C_STANDARD PROPERTY STRINGS auto c11 c99 c89)
  162. set(CIVETWEB_CXX_STANDARD auto CACHE STRING
  163. "The C++ standard to use; auto determines the latest supported by the compiler")
  164. set_property(CACHE CIVETWEB_CXX_STANDARD PROPERTY STRINGS auto c++14 c++11 c++98)
  165. # Configure the linker
  166. if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
  167. find_program(GCC_AR gcc-ar)
  168. if (GCC_AR)
  169. set(CMAKE_AR ${GCC_AR})
  170. endif()
  171. find_program(GCC_RANLIB gcc-ranlib)
  172. if (GCC_RANLIB)
  173. set(CMAKE_RANLIB ${GCC_RANLIB})
  174. endif()
  175. endif()
  176. # Configure the C compiler
  177. message(STATUS "Configuring C Compiler")
  178. if ("${CIVETWEB_C_STANDARD}" STREQUAL "auto")
  179. add_c_compiler_flag(-std=c11)
  180. if (NOT HAVE_C_FLAG_STD_C11)
  181. add_c_compiler_flag(-std=c99)
  182. if (NOT HAVE_C_FLAG_STD_C99)
  183. add_c_compiler_flag(-std=c89)
  184. endif()
  185. endif()
  186. else()
  187. add_c_compiler_flag(-std=${CIVETWEB_C_STANDARD})
  188. endif()
  189. add_c_compiler_flag(-Wall)
  190. add_c_compiler_flag(-Wextra)
  191. add_c_compiler_flag(-Wshadow)
  192. add_c_compiler_flag(-Wsign-conversion)
  193. add_c_compiler_flag(-Wmissing-prototypes)
  194. add_c_compiler_flag(-Weverything)
  195. add_c_compiler_flag(/W4)
  196. add_c_compiler_flag(-Wno-padded)
  197. add_c_compiler_flag(/Wd4820) # padding
  198. add_c_compiler_flag(-Wno-unused-macros)
  199. add_c_compiler_flag(-Wno-format-nonliteral)
  200. if (MINGW)
  201. add_c_compiler_flag(-Wno-format)
  202. endif()
  203. add_c_compiler_flag(-Werror)
  204. add_c_compiler_flag(/WX)
  205. add_c_compiler_flag(-pedantic-errors)
  206. add_c_compiler_flag(-fvisibility=hidden)
  207. add_c_compiler_flag(-fstack-protector-strong RELEASE)
  208. add_c_compiler_flag(-flto RELEASE)
  209. add_c_compiler_flag(-fsanitize=undefined DEBUG)
  210. add_c_compiler_flag(-fsanitize=address DEBUG)
  211. if (HAVE_C_FLAG_FSANITIZE_ADDRESS)
  212. add_c_compiler_flag(-static-asan DEBUG)
  213. endif()
  214. add_c_compiler_flag(-fstack-protector-all DEBUG)
  215. add_c_compiler_flag(-mwindows)
  216. # Coverage build type
  217. set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING
  218. "Flags used by the C compiler during coverage builds."
  219. FORCE)
  220. set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
  221. "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
  222. "Flags used for linking binaries during coverage builds."
  223. FORCE)
  224. set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
  225. "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
  226. "Flags used by the shared libraries linker during coverage builds."
  227. FORCE)
  228. mark_as_advanced(
  229. CMAKE_CXX_FLAGS_COVERAGE
  230. CMAKE_C_FLAGS_COVERAGE
  231. CMAKE_EXE_LINKER_FLAGS_COVERAGE
  232. CMAKE_SHARED_LINKER_FLAGS_COVERAGE)
  233. set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
  234. "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage."
  235. FORCE)
  236. add_c_compiler_flag(--coverage COVERAGE)
  237. # Configure the C++ compiler
  238. if (CIVETWEB_ENABLE_CXX)
  239. message(STATUS "Configuring C++ Compiler")
  240. if ("${CIVETWEB_CXX_STANDARD}" STREQUAL "auto")
  241. add_cxx_compiler_flag(-std=c++14)
  242. if (NOT HAVE_CXX_FLAG_STD_CXX14)
  243. add_cxx_compiler_flag(-std=c++11)
  244. if (NOT HAVE_CXX_FLAG_STD_CXX11)
  245. add_cxx_compiler_flag(-std=c++98)
  246. endif()
  247. endif()
  248. else()
  249. add_cxx_compiler_flag(-std=${CIVETWEB_CXX_STANDARD})
  250. endif()
  251. add_cxx_compiler_flag(-Wall)
  252. add_cxx_compiler_flag(-Wextra)
  253. add_cxx_compiler_flag(-Wshadow)
  254. add_cxx_compiler_flag(-Wsign-conversion)
  255. add_cxx_compiler_flag(-Wmissing-prototypes)
  256. add_cxx_compiler_flag(-Weverything)
  257. add_cxx_compiler_flag(/W4)
  258. add_cxx_compiler_flag(-Wno-padded)
  259. add_cxx_compiler_flag(/Wd4820) # padding
  260. add_cxx_compiler_flag(-Wno-unused-macros)
  261. add_cxx_compiler_flag(-Wno-format-nonliteral)
  262. if (MINGW)
  263. add_cxx_compiler_flag(-Wno-format)
  264. endif()
  265. add_cxx_compiler_flag(-Werror)
  266. add_cxx_compiler_flag(/WX)
  267. add_cxx_compiler_flag(-pedantic-errors)
  268. add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
  269. add_cxx_compiler_flag(-fvisibility=hidden)
  270. add_cxx_compiler_flag(-fstack-protector-strong RELEASE)
  271. add_cxx_compiler_flag(-flto RELEASE)
  272. add_cxx_compiler_flag(-fsanitize=undefined DEBUG)
  273. add_cxx_compiler_flag(-fsanitize=address DEBUG)
  274. if (HAVE_CXX_FLAG_FSANITIZE_ADDRESS)
  275. add_cxx_compiler_flag(-static-asan DEBUG)
  276. endif()
  277. add_cxx_compiler_flag(-fstack-protector-all DEBUG)
  278. add_cxx_compiler_flag(-mwindows)
  279. set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
  280. "Flags used by the C++ compiler during coverage builds."
  281. FORCE)
  282. add_cxx_compiler_flag(--coverage COVERAGE)
  283. endif()
  284. # Set up the definitions
  285. if (${CMAKE_BUILD_TYPE} MATCHES "[Dd]ebug")
  286. add_definitions(-DDEBUG)
  287. endif()
  288. if (HAVE_STDINT)
  289. add_definitions(-DHAVE_STDINT)
  290. endif()
  291. if (CIVETWEB_ENABLE_IPV6)
  292. add_definitions(-DUSE_IPV6)
  293. endif()
  294. if (CIVETWEB_ENABLE_WEBSOCKETS)
  295. add_definitions(-DUSE_WEBSOCKET)
  296. endif()
  297. if (CIVETWEB_ENABLE_LUA)
  298. add_definitions(-DUSE_LUA)
  299. endif()
  300. if (CIVETWEB_ENABLE_MEMORY_DEBUGGING)
  301. add_definitions(-DMEMORY_DEBUGGING)
  302. endif()
  303. if (NOT CIVETWEB_ENABLE_SSL)
  304. add_definitions(-DNO_SSL)
  305. elseif (NOT CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
  306. add_definitions(-DNO_SSL_DL)
  307. else()
  308. if(CIVETWEB_SSL_SSL_LIB)
  309. add_definitions(-DSSL_LIB="${CIVETWEB_SSL_SSL_LIB}")
  310. endif()
  311. if(CIVETWEB_SSL_CRYPTO_LIB)
  312. add_definitions(-DCRYPTO_LIB="${CIVETWEB_SSL_CRYPTO_LIB}")
  313. endif()
  314. endif()
  315. add_definitions(-DUSE_STACK_SIZE=${CIVETWEB_THREAD_STACK_SIZE})
  316. add_definitions(-DMAX_REQUEST_SIZE=${CIVETWEB_MAX_REQUEST_SIZE})
  317. # Build the targets
  318. add_subdirectory(src)
  319. # Enable the testing of the library/executable
  320. include(CTest)
  321. if (BUILD_TESTING)
  322. # Check unit testing framework Version
  323. set(CIVETWEB_CHECK_VERSION 0.9.14 CACHE STRING
  324. "The version of Check unit testing framework to build and include statically")
  325. set_property(CACHE CIVETWEB_CHECK_VERSION PROPERTY VALUE ${CIVETWEB_CHECK_VERSION})
  326. message(STATUS "Check Unit Testing Framework Version - ${CIVETWEB_CHECK_VERSION}")
  327. mark_as_advanced(CIVETWEB_CHECK_VERSION)
  328. # Check unit testing framework Verification Hash
  329. set(CIVETWEB_CHECK_MD5_HASH 38263d115d784c17aa3b959ce94be8b8 CACHE STRING
  330. "The hash of Check unit testing framework archive to be downloaded")
  331. set_property(CACHE CIVETWEB_CHECK_MD5_HASH PROPERTY VALUE ${CIVETWEB_CHECK_MD5_HASH})
  332. mark_as_advanced(CIVETWEB_CHECK_MD5_HASH)
  333. # Build the testing
  334. add_subdirectory(test)
  335. endif()
  336. # Set up CPack
  337. include(InstallRequiredSystemLibraries)
  338. set(CPACK_PACKAGE_VENDOR "civetweb Contributors")
  339. set(CPACK_PACKAGE_CONTACT "civetweb@github.com")
  340. set(CPACK_PACKAGE_VERSION_MAJOR "${CIVETWEB_VERSION_MAJOR}")
  341. set(CPACK_PACKAGE_VERSION_MINOR "${CIVETWEB_VERSION_MINOR}")
  342. set(CPACK_PACKAGE_VERSION_PATCH "${CIVETWEB_VERSION_PATCH}")
  343. set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A HTTP library and server")
  344. set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
  345. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.md")
  346. set(CPACK_STRIP_FILES TRUE)
  347. set(CPACK_PACKAGE_DEPENDS "openssl")
  348. if (CIVETWEB_ENABLE_LUA_SHARED)
  349. set(CPACK_PACKAGE_DEPENDS "lua, ${CPACK_PACKAGE_DEPENDS}")
  350. endif()
  351. # RPM Packaging
  352. set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
  353. set(CPACK_RPM_PACKAGE_LICENSE "MIT")
  354. set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CIVETWEB_ARCHITECTURE}")
  355. set(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_PACKAGE_DEPENDS}")
  356. # Debian Packaging
  357. set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CIVETWEB_ARCHITECTURE}")
  358. set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/bel2125/civetweb")
  359. set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
  360. # WiX Packaging
  361. # TODO: www.cmake.org/cmake/help/v3.0/module/CPackWIX.html
  362. # Finalize CPack settings
  363. include(CPack)