diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2006-04-08 12:54:55 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2006-04-08 12:54:55 +0000 |
commit | b3389e6dba49823c71faa20fb168897422c1df50 (patch) | |
tree | 5337711b71b6d8c0875eba1f8103bb657bac73cb | |
parent | 1e0c87f062f076101762defc239585597bc7cf36 (diff) | |
download | extra-cmake-modules-b3389e6dba49823c71faa20fb168897422c1df50.tar.gz extra-cmake-modules-b3389e6dba49823c71faa20fb168897422c1df50.tar.bz2 |
limit gnuwin32 package to windows
svn path=/trunk/KDE/kdelibs/; revision=527490
-rw-r--r-- | modules/FindLibXml2.cmake | 16 | ||||
-rw-r--r-- | modules/FindLibXslt.cmake | 19 |
2 files changed, 20 insertions, 15 deletions
diff --git a/modules/FindLibXml2.cmake b/modules/FindLibXml2.cmake index 7bc10d79..a5d8ab17 100644 --- a/modules/FindLibXml2.cmake +++ b/modules/FindLibXml2.cmake @@ -6,13 +6,17 @@ # LIBXML2_LIBRARIES - the libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 # -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls - -INCLUDE(UsePkgConfig) - -PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags) +IF (WIN32) + FIND_PACKAGE(GNUWIN32) + SET(_LibXml2IncDir ${GNUWIN32_DIR}/include) + SET(_LibXml2LinkDir ${GNUWIN32_DIR}/lib) +ELSE (WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags) +ENDIF (WIN32) set(LIBXML2_DEFINITIONS ${_LibXml2Cflags}) diff --git a/modules/FindLibXslt.cmake b/modules/FindLibXslt.cmake index be9cd16f..aae6310d 100644 --- a/modules/FindLibXslt.cmake +++ b/modules/FindLibXslt.cmake @@ -7,22 +7,24 @@ # LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt # - -# 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) +IF (WIN32) + FIND_PACKAGE(GNUWIN32) + SET(_LibXsltIncDir ${GNUWIN32_DIR}/include) + SET(_LibXsltLinkDir ${GNUWIN32_DIR}/lib) +ELSE (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) +ENDIF (WIN32) set(LIBXSLT_DEFINITIONS ${_LibXsltCflags}) -FIND_PACKAGE(GNUWIN32) FIND_PATH(LIBXSLT_INCLUDE_DIR libxslt/xslt.h ${_LibXsltIncDir} /usr/include /usr/local/include - ${GNUWIN32_DIR}/include ) FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt @@ -30,7 +32,6 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt ${_LibXsltLinkDir} /usr/lib /usr/local/lib - ${GNUWIN32_DIR}/lib ) if (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) |