From 36d87e18a1ffe4d4f23fbd1bb4ba77c9bc10c099 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 12 Jan 2016 15:48:55 +0100 Subject: 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. --- Modules/FindPkgConfig.cmake | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v0.12