CMake: find and use pcre3.dll when looking for PCRE

This commit is contained in:
Jiapeng Li 2013-12-08 14:24:48 +01:00 committed by Romuald Conty
parent aa2c1c47cd
commit 8026d6c047
2 changed files with 7 additions and 5 deletions

View file

@ -6,6 +6,6 @@ SET(bundle "${CMAKE_INSTALL_PREFIX}/bin/nfc-list@CMAKE_EXECUTABLE_SUFFIX@")
# set other_libs to a list of additional libs that cannot be reached by dependency analysis
SET(other_libs "")
SET(dirs "@LIBUSB_LIBRARY_DIR@")
SET(dirs "@LIBUSB_LIBRARY_DIR@" "@PCRE_BIN_DIRS@")
fixup_bundle("${bundle}" "${other_libs}" "${dirs}")

View file

@ -15,15 +15,16 @@ IF(WIN32)
IF(NOT PCRE_FOUND)
FIND_PATH(PCRE_INCLUDE_DIRS regex.h)
FIND_LIBRARY(PCRE_LIBRARIES NAMES PCRE pcre)
IF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES)
FIND_PATH(PCRE_BIN_DIRS pcre3.dll)
IF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
SET(PCRE_FOUND TRUE)
ENDIF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES)
ENDIF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
ENDIF(NOT PCRE_FOUND)
IF(PCRE_FOUND)
IF(NOT PCRE_FIND_QUIETLY)
MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARIES} ${PCRE_INCLUDE_DIRS}")
MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARIES} ${PCRE_INCLUDE_DIRS} ${PCRE_BIN_DIRS}")
ENDIF (NOT PCRE_FIND_QUIETLY)
ELSE(PCRE_FOUND)
IF(PCRE_FIND_REQUIRED)
@ -35,6 +36,7 @@ IF(WIN32)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
PCRE_LIBRARIES
PCRE_INCLUDE_DIRS
PCRE_BIN_DIRS
)
ENDIF(WIN32)