[cmake-developers] FindPkgConfig and CMAKE_PREFIX_PATH

Brad King brad.king at kitware.com
Tue Oct 22 08:29:31 EDT 2013


On 10/22/2013 03:27 AM, Daniele E. Domenichelli wrote:
> 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})

I haven't been involved with development of FindPkgConfig but it looks
useful to me.  It should have an option to disable the behavior though,
and of course be documented.

-Brad



More information about the cmake-developers mailing list