Commit a3287b38 authored by Laurent Montel's avatar Laurent Montel

Don't try to use pkg-config on win32

svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=804224
parent bb232092
......@@ -19,22 +19,24 @@ if(LIBSPECTRE_INCLUDE_DIR AND LIBSPECTRE_LIBRARY)
else(LIBSPECTRE_INCLUDE_DIR AND LIBSPECTRE_LIBRARY)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(UsePkgConfig)
PKGCONFIG(libspectre _SpectreIncDir _SpectreLinkDir _SpectreLinkFlags _SpectreCflags)
if(_SpectreLinkFlags)
# find again pkg-config, to query it about libspectre version
FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
# query pkg-config asking for a libspectre >= LIBSPECTRE_MINIMUM_VERSION
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${LIBSPECTRE_MINIMUM_VERSION} libspectre RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
if(_return_VALUE STREQUAL "0")
set(LIBSPECTRE_FOUND TRUE)
endif(_return_VALUE STREQUAL "0")
endif(_SpectreLinkFlags)
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(libspectre _SpectreIncDir _SpectreLinkDir _SpectreLinkFlags _SpectreCflags)
if(_SpectreLinkFlags)
# find again pkg-config, to query it about libspectre version
FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
# query pkg-config asking for a libspectre >= LIBSPECTRE_MINIMUM_VERSION
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${LIBSPECTRE_MINIMUM_VERSION} libspectre RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
if(_return_VALUE STREQUAL "0")
set(LIBSPECTRE_FOUND TRUE)
endif(_return_VALUE STREQUAL "0")
endif(_SpectreLinkFlags)
endif(NOT WIN32)
if (LIBSPECTRE_FOUND)
set(LIBSPECTRE_LIBRARY ${_SpectreLinkFlags})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment