From: Jeff Trawick Date: Sat, 31 Aug 2013 12:37:31 +0000 (+0000) Subject: add option EXTRA_INCLUDE_DIRS for pointing to outside directories X-Git-Tag: 2.5.0-alpha~5128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f606e222f4050ecc1898fba2720f541532502df7;p=apache add option EXTRA_INCLUDE_DIRS for pointing to outside directories for .h files (sometimes needed with statically linked, third-party modules) axe remnant of the old way of finding private APR .h files install .h files that live outside of the top include directory git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519175 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 240f3e3b36..897e43291e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv lib # Misc. options SET(WITH_MODULES "" CACHE STRING "comma-separated paths to single-file modules to statically link into the server") +SET(EXTRA_INCLUDE_DIRS "" CACHE STRING "extra include directories") # Options for each available module # "A" ("A"ctive) means installed and active in default .conf, fail if can't be built @@ -414,6 +415,7 @@ CONFIGURE_FILE(os/win32/win32_config_layout.h SET(HTTPD_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR} + ${EXTRA_INCLUDE_DIRS} # see discussion in cmake bug 13188 regarding oddities with relative paths ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/os/win32 @@ -427,10 +429,30 @@ SET(HTTPD_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl ${CMAKE_CURRENT_SOURCE_DIR}/server ${APR_INCLUDE_DIR} - ${APR_PRIVATE_INCLUDE_DIRS} ${PCRE_INCLUDE_DIR} ) +# The .h files we install from outside the main include directory +# largely parallel the include directories above. +SET(other_installed_h + ${PROJECT_BINARY_DIR}/ap_config_layout.h + ${CMAKE_CURRENT_SOURCE_DIR}/os/win32/os.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/cache/mod_cache.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/core/mod_so.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/core/mod_watchdog.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/database/mod_dbd.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/dav/main/mod_dav.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filters/mod_include.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filters/mod_xml2enc.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/generators/mod_cgi.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/generators/mod_status.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/loggers/mod_log_config.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/mappers/mod_rewrite.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/proxy/mod_proxy.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/session/mod_session.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl/mod_ssl.h +) + INCLUDE_DIRECTORIES(${HTTPD_INCLUDE_DIRECTORIES}) SET(HTTPD_SYSTEM_LIBS @@ -599,6 +621,8 @@ INSTALL(TARGETS ${install_modules} INSTALL(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h" ) +INSTALL(FILES ${other_installed_h} DESTINATION include) + INSTALL(DIRECTORY docs/manual/ DESTINATION manual FILES_MATCHING PATTERN "BUILDING" EXCLUDE ) diff --git a/README.cmake b/README.cmake index ae0c6631ca..db9b970e38 100644 --- a/README.cmake +++ b/README.cmake @@ -126,6 +126,12 @@ How to build the autoconf-based build. Key differences: The modpath (e.g., "generators") isn't provided or used, and the copy of the module source being built is automatically updated when it changes. + See also EXTRA_INCLUDE_DIRS. + + EXTRA_INCLUDE_DIRS: + List of additional directories to search for .h files. This may + be necessary when including third-party modules in the httpd build + via WITH_MODULES. Port and SSLPort: port numbers for substitution into default .conf files. (The defaults are 80 and 443.) @@ -179,7 +185,6 @@ Known Bugs and Limitations * ab + HAVE_OPENSSL isn't working at all, even for non-SSL * ApacheMonitor has a build error and is disabled * CGI examples aren't installed -* .h files which reside outside of include are not installed * module enablement defaults are not in sync with the autoconf-based build Generally: