diff options
| author | Laurent Montel <montel@kde.org> | 2008-11-10 07:54:10 +0000 | 
|---|---|---|
| committer | Laurent Montel <montel@kde.org> | 2008-11-10 07:54:10 +0000 | 
| commit | 114be0522e85d5c34fe48a1b9d56afc99e15e83b (patch) | |
| tree | 35ea8e9a07ab045e1515afa04d1dc9332348df84 | |
| parent | 6d31676dc685dd3123844eb265e0a60758e2e302 (diff) | |
| download | extra-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.cmake | 15 | 
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 ) | 
