summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2016-01-12 14:48:55 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-12 18:42:17 (GMT)
commit36d87e18a1ffe4d4f23fbd1bb4ba77c9bc10c099 (patch)
tree6137209a673770af10ec6046173233c193191f7e /Modules
parentb5009720d3020021f189570d72c099963795a5c5 (diff)
downloadCMake-36d87e18a1ffe4d4f23fbd1bb4ba77c9bc10c099.zip
CMake-36d87e18a1ffe4d4f23fbd1bb4ba77c9bc10c099.tar.gz
CMake-36d87e18a1ffe4d4f23fbd1bb4ba77c9bc10c099.tar.bz2
FindPkgConfig: add PREFIX/share/pkgconfig to PKG_CONFIG_PATH (#15910)
Most packages install their .pc files into PREFIX/lib/pkgconfig, but some put them into PREFIX/share/pkgconfig. Either is valid, and pkg-config itself looks in both for the /usr and /usr/local prefixes. This fixes an issue where some packages (yajl, for example) are not found if they are installed into a non-standard prefix and CMAKE_PREFIX_PATH is used to locate them.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPkgConfig.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index d519c1d..eba6953 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -263,6 +263,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
endif()
endif()
list(APPEND _lib_dirs "lib/pkgconfig")
+ list(APPEND _lib_dirs "share/pkgconfig")
# Check if directories exist and eventually append them to the
# pkgconfig path list