summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2024-07-20 14:51:16 +0200
committerIvan Zhakov <ivan@apache.org>2024-07-20 14:51:16 +0200
commita476b3f5a0f04d53fc26c6a76620f8adb055f645 (patch)
tree9ec100292dcc90d95971048acca4cf4d8ee375d4 /CMakeLists.txt
parent* os/win32/modules.c: Include "ap_config.h" to match the file generated by (diff)
downloadapache2-a476b3f5a0f04d53fc26c6a76620f8adb055f645.tar.xz
apache2-a476b3f5a0f04d53fc26c6a76620f8adb055f645.zip
* CMakeLists.txt: By default use PCRE2 CMake package if supported.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919395 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ff89d049f..91260d62c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ FIND_PACKAGE(Lua51)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(CURL)
+FIND_PACKAGE(PCRE2 COMPONENTS 8BIT)
# Options for support libraries not supported by cmake-bundled FindFOO
@@ -49,7 +50,10 @@ ENDIF()
# PCRE names its libraries differently for debug vs. release builds.
# We can't query our own CMAKE_BUILD_TYPE at configure time.
# If the debug version exists in PREFIX/lib, default to that one.
-IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/pcre2-8d.lib")
+IF(PCRE2_FOUND)
+ SET(default_pcre_libraries "PCRE2::8BIT")
+ SET(default_pcre_cflags "-DHAVE_PCRE2")
+ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/pcre2-8d.lib")
SET(default_pcre_libraries ${CMAKE_INSTALL_PREFIX}/lib/pcre2-8d.lib)
SET(default_pcre_cflags "-DHAVE_PCRE2")
ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/pcre2-8.lib")