[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    multiple pathes in cmake variables
From:       billlist () nycap ! rr ! com (William A !  Hoffman)
Date:       2006-02-11 16:42:05
Message-ID: 6.2.0.14.2.20060211113939.07cbac68 () pop ! nycap ! rr ! com
[Download RAW message or body]

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
>)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic