diff --git a/cmake/FixBundle.cmake.in b/cmake/FixBundle.cmake.in index 6e8f843..d11dc8f 100644 --- a/cmake/FixBundle.cmake.in +++ b/cmake/FixBundle.cmake.in @@ -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}") diff --git a/cmake/modules/FindPCRE.cmake b/cmake/modules/FindPCRE.cmake index 0b83def..3d043aa 100644 --- a/cmake/modules/FindPCRE.cmake +++ b/cmake/modules/FindPCRE.cmake @@ -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)