summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJacob Champion <jchampion@apache.org>2016-07-12 21:13:34 +0200
committerJacob Champion <jchampion@apache.org>2016-07-12 21:13:34 +0200
commit91059cd2f71589890ec43fe07950a8581d40547d (patch)
tree83b237b94054475c9358a6c5ad3ce6df1f7d3396 /CMakeLists.txt
parentmod_http2: no master timeout while requests are ongoing (diff)
downloadapache2-91059cd2f71589890ec43fe07950a8581d40547d.tar.xz
apache2-91059cd2f71589890ec43fe07950a8581d40547d.zip
CMake: use CMAKE_REQUIRED_INCLUDES to find APR macros
When using CMake with Visual Studio on Windows, invoking the CHECK_SYMBOL_EXISTS macro with the full paths to the include files seems to always result in failure. Instead, use the documented CMAKE_REQUIRED_INCLUDES variable to set the include directory, and pass only the headers' base names to CHECK_SYMBOL_EXISTS. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1752331 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0fd892da5..9928fa0f2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,8 @@ GET_MOD_ENABLE_RANK("ENABLE_MODULES setting" ${ENABLE_MODULES} enable_modules_ra
# not defined to either 1 or 0)
MACRO(CHECK_APR_FEATURE which_define)
- CHECK_SYMBOL_EXISTS(${which_define} "${APR_INCLUDE_DIR}/apr.h;${APR_INCLUDE_DIR}/apu.h" tmp_${which_define})
+ SET(CMAKE_REQUIRED_INCLUDES "${APR_INCLUDE_DIR}")
+ CHECK_SYMBOL_EXISTS(${which_define} "apr.h;apu.h" tmp_${which_define})
IF(${tmp_${which_define}})
CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\"
#include \"${APR_INCLUDE_DIR}/apu.h\"