diff options
Diffstat (limited to 'Modules/FindLibXslt.cmake')
-rw-r--r-- | Modules/FindLibXslt.cmake | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake index 5c3953a..d16d1ff 100644 --- a/Modules/FindLibXslt.cmake +++ b/Modules/FindLibXslt.cmake @@ -1,4 +1,4 @@ -# - Try to find LibXslt +# - Try to find the LibXslt library # Once done this will define # # LIBXSLT_FOUND - system has LibXslt @@ -20,26 +20,23 @@ # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) -IF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) - # in cache already - SET(LibXslt_FIND_QUIETLY TRUE) -ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) - -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(libxslt _LibXsltIncDir _LibXsltLinkDir _LibXsltLinkFlags _LibXsltCflags) - SET(LIBXSLT_DEFINITIONS ${_LibXsltCflags}) -ENDIF (NOT WIN32) - -FIND_PATH(LIBXSLT_INCLUDE_DIR libxslt/xslt.h - ${_LibXsltIncDir} +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +FIND_PACKAGE(PkgConfig) +PKG_CHECK_MODULES(PC_LIBXSLT libxslt) +SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER}) + + +FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h + HINTS + ${PC_LIBXSLT_INCLUDEDIR} + ${PC_LIBXSLT_INCLUDE_DIRS} ) FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt - PATHS - ${_LibXsltLinkDir} + HINTS + ${PC_LIBXSLT_LIBDIR} + ${PC_LIBXSLT_LIBRARY_DIRS} ) INCLUDE(FindPackageHandleStandardArgs) |