Added FindPCRE.cmake which is used by the FindMySQL.cmake.

This commit is contained in:
Markus Makela
2015-04-16 18:11:29 +03:00
parent 39bbc93bbc
commit 254b1bf05d
3 changed files with 27 additions and 2 deletions

View File

@ -91,8 +91,13 @@ check_library_exists(${EMBEDDED_LIB} pcre_stack_guard ${EMBEDDED_LIB} HAVE_EMBED
if(HAVE_EMBEDDED_PCRE)
set(PCRE_LINK_FLAGS "" CACHE INTERNAL "pcre linker flags")
else()
message(STATUS "Embedded mysqld does not have pcre_stack_guard, linking with system pcre.")
set(PCRE_LINK_FLAGS "pcre" CACHE INTERNAL "pcre linker flags")
find_package(PCRE)
if(PCRE_FOUND)
set(PCRE_LINK_FLAGS "pcre" CACHE INTERNAL "pcre linker flags")
message(STATUS "Embedded mysqld does not have pcre_stack_guard, linking with system pcre.")
else()
message(FATAL_ERROR "Could not find PCRE libraries.")
endif()
endif()
if( (${EMBEDDED_LIB} MATCHES "NOTFOUND") OR (${EMBEDDED_LIB} MATCHES "NOTFOUND"))
message(FATAL_ERROR "Library not found: libmysqld. If your install of MySQL is in a non-default location, please provide the location with -DEMBEDDED_LIB=<path to library>")