aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/FindPCRE.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake
index ba2de623..8e9507e4 100644
--- a/modules/FindPCRE.cmake
+++ b/modules/FindPCRE.cmake
@@ -20,16 +20,19 @@ endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
- include(UsePkgConfig)
-
- pkgconfig(libpcre _PCREIncDir _PCRELinkDir _PCRELinkFlags _PCRECflags)
+ INCLUDE(FindPkgConfig)
+
+ PKG_CHECK_MODULES(PCRE libpcre)
+
+ SET(PCRE_DEFINITIONS ${PCRE_CFLAGS})
+
endif (NOT WIN32)
-find_path(PCRE_INCLUDE_DIR pcre.h PATHS ${_PCREIncDir} PATH_SUFFIXES pcre)
+find_path(PCRE_INCLUDE_DIR pcre.h PATHS ${PCRE_INCLUDE_DIRS} PATH_SUFFIXES pcre)
-find_library(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${_PCRELinkDir})
+find_library(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${PCRE_LIBRARY_DIRS})
-find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${_PCRELinkDir})
+find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${PCRE_LIBRARY_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY )