1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

find pcre2.h in a non-default location

for macos builder
This commit is contained in:
Sergei Golubchik
2026-05-04 12:26:55 +02:00
parent d4ac1d6e14
commit 38b971c99d

View File

@@ -94,8 +94,13 @@ MACRO (CHECK_PCRE)
PKG_CHECK_MODULES(PCRE libpcre2-8)
# in case pkg-config or libpcre2-8.pc is not installed:
CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "${PCRE_LIBRARY_DIRS}" HAVE_PCRE2_MATCH_8)
find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h)
MESSAGE_ONCE(PCRE2_H "Looking for include file pcre2.h: ${PCRE2_INCLUDE_DIR}")
IF (PCRE2_INCLUDE_DIR)
SET(PCRE_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
ENDIF()
ENDIF()
IF(NOT HAVE_PCRE2_MATCH_8 OR WITH_PCRE STREQUAL "bundled")
IF(NOT HAVE_PCRE2_MATCH_8 OR NOT PCRE_INCLUDE_DIRS OR WITH_PCRE STREQUAL "bundled")
IF (WITH_PCRE STREQUAL "system")
MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable")
ENDIF()