From cba8933a83c2e96698b85b980438f30385f8420e Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 8 Apr 2006 22:43:16 +0000 Subject: optimized gnuwin32 detection on windows - find gnuwin32 package location very early - removed GNUWIN32_INCLUDE_DIR/GNUWIN32_LIBRARY_DIR macros, because FindGNUWIN32.cmake sets now CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH - don't use pkgconfig on windows svn path=/trunk/KDE/kdelibs/; revision=527634 --- modules/FindLibArt.cmake | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'modules/FindLibArt.cmake') diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake index 05d278b1..c1528bb3 100644 --- a/modules/FindLibArt.cmake +++ b/modules/FindLibArt.cmake @@ -4,27 +4,19 @@ # LIBART_FOUND - system has the LibArt # LIBART_INCLUDE_DIR - the LibArt include directory # LIBART_LIBRARIES - The libraries needed to use LibArt -# under Windows this also checks in the GNUWIN32 directory, so make -# sure that the GNUWIN32 directory gets found if you use the GNUWIN32 version of PCRE -# under UNIX pkgconfig among others pkg-config is used to find the directories - -INCLUDE(UsePkgConfig) - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) - -set(LIBART_DEFINITIONS ${_libArtCflags}) - -# under windows, try to find the base gnuwin32 directory, do nothing under UNIX -FIND_PACKAGE(GNUWIN32) +IF (NOT WIN32) + INCLUDE(UsePkgConfig) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags) + set(LIBART_DEFINITIONS ${_libArtCflags}) +ENDIF (NOT WIN32) FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h ${_libArtIncDir}/libart-2.0 /usr/include/libart-2.0 /usr/local/include/libart-2.0 - ${GNUWIN32_DIR}/include ) FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 @@ -32,7 +24,6 @@ FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 ${_libArtLinkDir} /usr/lib /usr/local/lib - ${GNUWIN32_DIR}/lib ) -- cgit v1.2.1