Hello all,
FindPkgConfig does not support the CMAKE_PREFIX_PATH variable.
This is because pkg-config uses the PKG_CONFIG_PATH and does not know
anything
about CMAKE_PREFIX_PATH.
As a consequence, pkg-config packages built and installed in a non standard
directory using ExternalProject, cannot be found, while cmake ones can
be easily
located setting the CMAKE_PREFIX_PATH variable.
Do you think it could make sense to add to FindPkgConfig something like
this?
set(_pkgconfig_path $ENV{PKG_CONFIG_PATH})
foreach(_dir ${CMAKE_PREFIX_PATH})
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${_dir}/lib/pkgconfig")
endforeach()
[...] (search for package)
set(ENV{PKG_CONFIG_PATH} ${_pkgconfig_path})
Cheers,
Daniele
--
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