summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-05 21:47:22 -0700
committerirungentoo <irungentoo@gmail.com>2013-08-05 21:47:22 -0700
commit9613646af24090e02be831dafdd1405146cf75b5 (patch)
treef0fa8bf6e245003b363ed52646b1169bf0e28783
parentb4664f3f29f48723cf6ba9ba7119710ce0a88a40 (diff)
parent3cd6aeb541781e23d9129c9503611740134c45e2 (diff)
Merge pull request #353 from cjsthompson/master
On UNIX, if pkg-config is available, use it to find the location of libconfig's headers.
-rw-r--r--cmake/FindLIBCONFIG.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/FindLIBCONFIG.cmake b/cmake/FindLIBCONFIG.cmake
index d5018240..b3ae4d11 100644
--- a/cmake/FindLIBCONFIG.cmake
+++ b/cmake/FindLIBCONFIG.cmake
@@ -5,7 +5,12 @@
5# LIBCONFIG_FOUND 5# LIBCONFIG_FOUND
6# 6#
7 7
8FIND_PATH(LIBCONFIG_INCLUDE_DIR NAMES libconfig.h) 8if (UNIX)
9 find_package(PkgConfig QUIET)
10 pkg_check_modules(_LIBCONFIG QUIET libconfig)
11endif ()
12
13FIND_PATH(LIBCONFIG_INCLUDE_DIR NAMES libconfig.h HINTS ${_LIBCONFIG_INCLUDEDIR})
9 14
10FIND_LIBRARY(LIBCONFIG_LIBRARY NAMES config) 15FIND_LIBRARY(LIBCONFIG_LIBRARY NAMES config)
11 16