[CMake] FindPackage: Mismatch between documentation and implementation ?

Nils Gladitz nilsgladitz at gmail.com
Mon May 5 14:38:08 EDT 2014


On 05.05.2014 20:19, Theodore Papadopoulo wrote:
> This variable XXX_DIR is set to the installation directory of XXX,
> which contains in the subdirectory share/cmake/XXX the proper config
> files. But find_package does not find them, even though the
> documentation states that XXX_DIR is used as a prefix and that (for
> unix) a set of subdirectories are searched.  [ see the prefix section
> and then subsection 2. of prefix generation].

The "<package>_DIR" variable listed under 2. is an environment (not 
cmake) variable:
     "Search paths specified in cmake-specific environment variables."

There is a "<package>_DIR" cache variable that cmake itself creates for 
config mode packages to hold the path of the config file (not prefix).

Nils


More information about the CMake mailing list