Merge pull request #353 from cjsthompson/master

On UNIX, if pkg-config is available, use it to find the location of libconfig's headers.
This commit is contained in:
irungentoo 2013-08-05 21:47:22 -07:00
commit 9613646af2

View File

@ -5,7 +5,12 @@
# 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)