I scanned through the patches Gentoo applies to CMake to find out which ones should be dropped in 2.8.9. I found this one:
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index c47f583..5783d37 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -87,7 +87,12 @@
set(PKG_CONFIG_VERSION 1)
set(PKG_CONFIG_FOUND 0)
-find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config
executable")
+if(NOT PKG_CONFIG_EXECUTABLE)
+ set(PKG_CONFIG_EXECUTABLE $ENV{PKG_CONFIG})
+ if(NOT PKG_CONFIG_EXECUTABLE)
+ find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-
config executable")
+ endif(NOT PKG_CONFIG_EXECUTABLE)
+endif(NOT PKG_CONFIG_EXECUTABLE)
mark_as_advanced(PKG_CONFIG_EXECUTABLE)
if(PKG_CONFIG_EXECUTABLE)
While thinking if we could do that better I found 2 things:
-Not related to this patch: autoconf searches for prefixed pkg-config first,
i.e.
prefixed with the compiler prefix. We should probably do the same when cross-
compiling.
-We have a way to give hints about the paths via an environment variable for
find_program, but I think it would make sense to also allow environment
variables specifying the absolute path to the executable itself as part of the
find_program API.
Any thoughts?
Eike
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
