mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
MDEV-5620 CMake option to compile against an external PCRE library
This commit is contained in:
parent
8705d00ab6
commit
016bd4fc5f
14 changed files with 31 additions and 24 deletions
|
|
@ -46,7 +46,7 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
SET(WITH_JEMALLOC ${WITH_JEMALLOC_DEFAULT} CACHE STRING
|
||||
"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
|
||||
"Which jemalloc to use. Possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)")
|
||||
|
||||
MACRO (CHECK_JEMALLOC)
|
||||
IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes")
|
||||
|
|
|
|||
16
cmake/pcre.cmake
Normal file
16
cmake/pcre.cmake
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
SET(WITH_PCRE "auto" CACHE STRING
|
||||
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
|
||||
|
||||
MACRO (CHECK_PCRE)
|
||||
IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
|
||||
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
|
||||
ENDIF()
|
||||
IF(NOT HAVE_PCRE)
|
||||
IF (WITH_PCRE STREQUAL "system")
|
||||
MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
|
||||
ENDIF()
|
||||
SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre)
|
||||
ADD_SUBDIRECTORY(pcre)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
|
@ -37,8 +37,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
# Add common include directories
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/sql
|
||||
${CMAKE_BINARY_DIR}/pcre
|
||||
${CMAKE_SOURCE_DIR}/pcre
|
||||
${PCRE_INCLUDES}
|
||||
${SSL_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue