You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2019/08/30 08:25:14 UTC
svn commit: r1866131 - /httpd/httpd/trunk/CMakeLists.txt
Author: wrowe
Date: Fri Aug 30 08:25:13 2019
New Revision: 1866131
URL: http://svn.apache.org/viewvc?rev=1866131&view=rev
Log:
Complete mod_md CMake config by adding a _requires iterator, using the official
curl FIND_PACKAGE logic and completing the jansson detection logic.
Modified:
httpd/httpd/trunk/CMakeLists.txt
Modified: httpd/httpd/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CMakeLists.txt?rev=1866131&r1=1866130&r2=1866131&view=diff
==============================================================================
--- httpd/httpd/trunk/CMakeLists.txt (original)
+++ httpd/httpd/trunk/CMakeLists.txt Fri Aug 30 08:25:13 2019
@@ -26,6 +26,7 @@ FIND_PACKAGE(LibXml2)
FIND_PACKAGE(Lua51)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(ZLIB)
+FIND_PACKAGE(CURL)
# Options for support libraries not supported by cmake-bundled FindFOO
@@ -70,12 +71,6 @@ ELSE()
SET(default_check_libraries)
ENDIF()
-IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/curl.lib")
- SET(default_curl_libraries "${CMAKE_INSTALL_PREFIX}/lib/curl.lib")
-ELSE()
- SET(default_curl_libraries)
-ENDIF()
-
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/jansson.lib")
SET(default_jansson_libraries "${CMAKE_INSTALL_PREFIX}/lib/jansson.lib")
ELSE()
@@ -92,10 +87,10 @@ SET(LIBXML2_ICONV_INCLUDE_DIR ""
SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv libraries to link with for libxml2")
SET(BROTLI_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with include files for Brotli")
SET(BROTLI_LIBRARIES ${default_brotli_libraries} CACHE STRING "Brotli libraries to link with")
+SET(JANSSON_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with include files for jansson")
+SET(JANSSON_LIBRARIES "${default_jansson_libraries}" CACHE STRING "Jansson libraries to link with")
SET(CHECK_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with include files for Check")
SET(CHECK_LIBRARIES "${default_check_libraries}" CACHE STRING "Check libraries to link with")
-SET(CURL_LIBRARIES "${default_curl_libraries}" CACHE STRING "Curl libraries to link with")
-SET(JANSSON_LIBRARIES "${default_jansson_libraries}" CACHE STRING "Jansson libraries to link with")
# end support library configuration
# Misc. options
@@ -245,16 +240,16 @@ ELSE()
SET(CHECK_FOUND FALSE)
ENDIF()
-# See if we have curl
-SET(CURL_FOUND TRUE)
-IF(EXISTS "${CURL_INCLUDE_DIR}/curl/curl.h")
- FOREACH(onelib ${CURL_LIBRARIES})
+# See if we have Jansson
+SET(JANSSON_FOUND TRUE)
+IF(EXISTS "${JANSSON_INCLUDE_DIR}/jansson.h")
+ FOREACH(onelib ${JANSSON_LIBRARIES})
IF(NOT EXISTS ${onelib})
- SET(CURL_FOUND FALSE)
+ SET(JANSSON_FOUND FALSE)
ENDIF()
ENDFOREACH()
ELSE()
- SET(CURL_FOUND FALSE)
+ SET(JANSSON_FOUND FALSE)
ENDIF()
@@ -508,9 +503,7 @@ SET(mod_lua_extra_sources
modules/lua/lua_vmprep.c modules/lua/lua_dbd.c
)
SET(mod_lua_requires LUA51_FOUND)
-# TODO: _requires does not currently iterate a list, substitute the following once it does;
-# SET(mod_md_requires OPENSSL_FOUND CURL_FOUND JANSSON_FOUND HAVE_OPENSSL_102)
-SET(mod_md_requires CURL_FOUND)
+SET(mod_md_requires OPENSSL_FOUND CURL_FOUND JANSSON_FOUND)
SET(mod_md_extra_includes ${OPENSSL_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${JANSSON_INCLUDE_DIR})
SET(mod_md_extra_libs ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${JANSSON_LIBRARIES} mod_watchdog)
SET(mod_md_extra_sources
@@ -828,15 +821,17 @@ FOREACH (mod ${MODULE_PATHS})
IF(NOT ${enable_mod_val} STREQUAL "O") # build of module is desired
SET(mod_requires "${mod_name}_requires")
STRING(TOUPPER ${enable_mod_val} enable_mod_val_upper)
- IF(NOT ${${mod_requires}} STREQUAL "") # module has some prerequisite
- IF(NOT ${${mod_requires}}) # prerequisite doesn't exist
- IF(NOT ${enable_mod_val} STREQUAL ${enable_mod_val_upper}) # lower case, so optional based on prereq
- MESSAGE(STATUS "${mod_name} was requested but couldn't be built due to a missing prerequisite (${${mod_requires}})")
- SET(enable_mod_val_upper "O") # skip due to missing prerequisite
- ELSE() # must be upper case "A" or "I" (or coding error above)
- MESSAGE(FATAL_ERROR "${mod_name} was requested but couldn't be built due to a missing prerequisite (${${mod_requires}})")
+ IF(NOT "${${mod_requires}}" STREQUAL "") # module has some prerequisite
+ FOREACH (required ${${mod_requires}})
+ IF(NOT ${required}) # prerequisite doesn't exist
+ IF(NOT ${enable_mod_val} STREQUAL ${enable_mod_val_upper}) # lower case, so optional based on prereq
+ MESSAGE(STATUS "${mod_name} was requested but couldn't be built due to a missing prerequisite (${required})")
+ SET(enable_mod_val_upper "O") # skip due to missing prerequisite
+ ELSE() # must be upper case "A" or "I" (or coding error above)
+ MESSAGE(FATAL_ERROR "${mod_name} was requested but couldn't be built due to a missing prerequisite (${required})")
+ ENDIF()
ENDIF()
- ENDIF()
+ ENDFOREACH()
ENDIF()
# map a->A, i->I, O->O for remaining logic since prereq checking is over
SET(enable_mod_val ${enable_mod_val_upper})