On UNIX, if pkg-config is available, use it to find the location of

libconfig's headers.

	modified:   cmake/FindLIBCONFIG.cmake
This commit is contained in:
Christoph J. Thompson 2013-08-06 06:33:32 +02:00
parent b4664f3f29
commit 3cd6aeb541

View File

@ -5,7 +5,12 @@
# LIBCONFIG_FOUND # LIBCONFIG_FOUND
# #
FIND_PATH(LIBCONFIG_INCLUDE_DIR NAMES libconfig.h) if (UNIX)
find_package(PkgConfig QUIET)
pkg_check_modules(_LIBCONFIG QUIET libconfig)
endif ()
FIND_PATH(LIBCONFIG_INCLUDE_DIR NAMES libconfig.h HINTS ${_LIBCONFIG_INCLUDEDIR})
FIND_LIBRARY(LIBCONFIG_LIBRARY NAMES config) FIND_LIBRARY(LIBCONFIG_LIBRARY NAMES config)