[CMake] pkg-config and cache

Andreas Beckermann b_mann at gmx.de
Tue Jun 5 18:16:39 EDT 2007


Hi
I am using cmake-2.4.5 on Linux along with the FindPkgConfig.cmake file from 
current cmake cvs.
The pkg_check_modules() macro works mostly fine (thanks a lot, btw, this saved 
me a lot of work), however I have one problem with it: once it checked 
whether the modules are available, it defines a variable 
__pkg_config_checked_<PREFIX> in CMakeCache.txt and won't check for these 
modules again, once that variable is defined.

This means that if a package is not available, the user has to delete 
CMakeCache.txt to make cmake realize that the module has been installed since 
the last run.

I find this behavior very unintuitive - is it intended?
According to the code there is unfortunately no way around this :-(

CU
Andi


More information about the CMake mailing list