On Tuesday 22 October 2013, Daniele E. Domenichelli wrote: > 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})
good idea I think. I guess it should also take lib64/ and the multiarch lib dirs into account. You may have a look into GNUInstallDirs.cmake, there this is handled too. Alex -- 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