multiple pathes in cmake variables
William A. Hoffman
billlist at nycap.rr.com
Sun Feb 12 02:04:35 CET 2006
At 05:22 PM 2/11/2006, Alexander Neundorf wrote:
>> Just have two calls to FIND_PATH:
>>
>> FIND_PATH(LIBXML2_INCLUDE_DIR libxml2/libxml/xpath.h ) # this one for
>> windows FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h # this one for unix
>> ${_LibXml2IncDir}
>> /usr/include
>> /usr/local/include
>> )
>
>What will go in the cache ?
Once it is found then, cmake stops looking, so the two calls are fine,
and you use the same variable name.
>> Then it should find it if is in libxml2 or just include/libxml.
>> CMAKE_INCLUDE_PATH really should not be referenced in the cmake list file.
>> The way you have it the environment variable version of CMAKE_INCLUDE_PATH
>> will not work. Also, you may have path \ / issues, and the foreach will
>> not work on unix where ; is not the path separator but : is.
>
>How about this:
>
>write a cmake module to find the gnuwin32 installation directory, so that we
>have GNUWIN32_INCLUDE_DIRECTORY, in your case f:\daten\gnuwin32\include .
>Is there a way to detect this ? Any special files we can rely on ?
I am not sure this will work, as gnuwin32 could have one or more packages
in it. There is no one specific thing you can look for.
>And then in FindLibXml2.cmake something like this:
>
>...
>FIND_PACKAGE(GNUWin32)
>...
>
>FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
> ${_LibXml2IncDir}/libxml2
> /usr/include/libxml2
> /usr/local/include/libxml2
> ${GNUWIN32_INCLUDE_DIR}/libxml2
>)
>
>What do you think ?
I think the two calls will work best.
-Bill
More information about the Kde-buildsystem
mailing list