multiple pathes in cmake variables

Ralf Habacker ralf.habacker at freenet.de
Sat Feb 11 19:01:17 CET 2006


William A. Hoffman schrieb:
> At 11:38 AM 2/11/2006, Alexander Neundorf wrote:
>   
>> On Saturday 11 February 2006 17:32, you wrote:
>> ...
>>     
>>> CMAKE_INCLUDE_PATH should NOT be listed in any cmake list file.
>>> It is automatically used by find_path see cmFindPathCommand.cxx and
>>> cmMakefile::GetIncludeSearchPath.  Same thing goes for CMAKE_LIBRARY_PATH.
>>>       
>> So instead of
>>
>> FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
>>  ${CMAKE_INCLUDE_PATH}/libxml2
>>  ${_LibXml2IncDir}/libxml2
>>  /usr/include/libxml2
>>  /usr/local/include/libxml2
>> )
>>
>> the test should better be like this ?
>>
>> FIND_PATH(LIBXML2_INCLUDE_DIR libxml2/libxml/xpath.h
>>  ${_LibXml2IncDir}
>>  /usr/include
>>  /usr/local/include
>> )
>>     
But this will not work. The source code uses #include <libxml/xpath.h>  
which requires, that 

LIBXML2_INCLUDE_DIR ends with <value of CMAKE_INCLUDE_PATH>/libxml2  and not only <value of CMAKE_INCLUDE_PATH>, which the above mentioned example results into. Do you have tried this ? 

> Yes, that looks better.  The idea behind CMAKE_INCLUDE_PATH
> and CMAKE_LIBRARY_PATH is that they use the same syntax as
> the native PATH variable, so for unix :, and windows ; separators.
> And, cmake will do the right thing and break up the variables.
> CMake first looks for a cmake variable of the name, then the
> environment variable are looked at, then the paths specified
> in the FIND_* call.
>
>   
> -Bill
>
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
>   



More information about the Kde-buildsystem mailing list