Skip to content

Commit

Permalink
Merge r1919395 from trunk:
Browse files Browse the repository at this point in the history
  *) CMake: By default use PCRE2 CMake package if supported.

Use non-Unix build exception to backport with CTR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1919664 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Aug 4, 2024
1 parent d4bcc10 commit c5863e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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

Expand All @@ -47,7 +48,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")
Expand Down

0 comments on commit c5863e8

Please sign in to comment.