[CMake] Confusion on how find_package works.

Andreas Pakulat apaku at gmx.de
Wed Jan 14 07:22:18 EST 2009


On 13.01.09 19:06:13, Robert Dailey wrote:
> Trust me, I've read this already. It makes no sense to me. How am I supposed
> to know that any of the variables it is checking have been set?

Not sure what you mean wit that. You can check for any cmake variable
wether its set via if(<variablename>)

> And if so, where were they set?

They are set via the commandline options when running cmake, i.e. cmake
-DCMAKE_PREFIX_PATH or by setting an environment variable before running
cmake. I'm not sure how the various CMake GUI's handle this.

> Could someone give me a summary of what find_path is
> searching in in this specific case?

Check section 4. and 5., both indicate whats used on the platforms to get
paths which should be checked. 4. mentions PATH and INCLUDE environment
variables, 5. mentiones platform files for the current system. Those
informations are usualy found in
<cmake>/share/cmake-2.6/Modules/Platform/<yourplatform>.cmake, in the case
of the CMAKE_SYSTEM_PREFIX_PATH variable you'll find the settings in the
*Paths.cmake files.

Andreas

-- 
Today's weirdness is tomorrow's reason why.
		-- Hunter S. Thompson


More information about the CMake mailing list