summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-01 14:39:43 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-01 14:39:43 (GMT)
commit0c46750d2c4cee401f1cda047a71b0e349678077 (patch)
tree4c174b17823d8e481e7dfb0636a5003783f646d0 /Modules
parentd7ca93f6194fa2b848945df630222b75b404b15a (diff)
parentfc695a776b5a4d61c3bfd3253ff9d40c3f30f6b9 (diff)
downloadCMake-0c46750d2c4cee401f1cda047a71b0e349678077.zip
CMake-0c46750d2c4cee401f1cda047a71b0e349678077.tar.gz
CMake-0c46750d2c4cee401f1cda047a71b0e349678077.tar.bz2
Merge topic 'FindEXPAT-use-PkgConfig'
fc695a77 FindEXPAT: use hints from PkgConfig
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindEXPAT.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index 70fc35b..ea55a73 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -25,11 +25,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+find_package(PkgConfig QUIET)
+
+pkg_check_modules(PC_EXPAT QUIET expat)
+
# Look for the header file.
-find_path(EXPAT_INCLUDE_DIR NAMES expat.h)
+find_path(EXPAT_INCLUDE_DIR NAMES expat.h HINTS ${PC_EXPAT_INCLUDE_DIRS})
# Look for the library.
-find_library(EXPAT_LIBRARY NAMES expat libexpat)
+find_library(EXPAT_LIBRARY NAMES expat libexpat HINTS ${PC_EXPAT_LIBRARY_DIRS})
if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h")
file(STRINGS "${EXPAT_INCLUDE_DIR}/expat.h" expat_version_str