invitation: try compiling kdelibs using cmake

Brad King brad.king at kitware.com
Sat Jan 28 00:26:14 CET 2006


William A. Hoffman wrote:
> At 04:30 PM 1/27/2006, Benjamin Reed wrote:
> 
>>On 1/27/06, William A. Hoffman <billlist at nycap.rr.com> wrote:
>>
>>>There are currently environment variables for this:
>>>
>>>CMAKE_LIBRARY_PATH
>>>CMAKE_INCLUDE_PATH
>>
>>in what order are these searched?  When I run:
>>
>> cmake -DCMAKE_INCLUDE_PATH:string=/sw/include \
>>   -DCMAKE_LIBRARY_PATH:string=/sw/lib .
> 
> Those have to be shell environment variables, and not cmake variables.
> (CMAKE_INCLUDE_PATH=/sw/include cmake .) should work.

Since paths specified on the command line like Ben's first attempt 
should probably take the highest priority I have now generalized the 
path ordering a bit.  Paths are now searched like this for libraries:

1.) Paths listed in the CMAKE_LIBRARY_PATH variable in the cache.
2.) Paths listed in the CMAKE_LIBRARY_PATH environment variable.
3.) Paths listed in the LIB environment variable.
4.) Paths listed in the call to the FIND_LIBRARY command.
5.) Paths listed in the PATH environment variable (useful for DLLs on 
windows).

and for include files:

1.) Paths listed in the CMAKE_INCLUDE_PATH variable in the cache.
2.) Paths listed in the CMAKE_INCLUDE_PATH environment variable.
3.) Paths listed in the INCLUDE environment variable.
4.) Paths listed in the call to the FIND_PATH command.

This order IMO is most-specific to least-specific for a particular 
system, project, user, and build tree.

-Brad


More information about the Kde-buildsystem mailing list