aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2008-11-10 07:54:10 +0000
committerLaurent Montel <montel@kde.org>2008-11-10 07:54:10 +0000
commit114be0522e85d5c34fe48a1b9d56afc99e15e83b (patch)
tree35ea8e9a07ab045e1515afa04d1dc9332348df84
parent6d31676dc685dd3123844eb265e0a60758e2e302 (diff)
downloadextra-cmake-modules-114be0522e85d5c34fe48a1b9d56afc99e15e83b.tar.gz
extra-cmake-modules-114be0522e85d5c34fe48a1b9d56afc99e15e83b.tar.bz2
Use FindPkgConfig
svn path=/trunk/KDE/kdelibs/; revision=882249
-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 )