[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-12 1:04:35
Message-ID: 6.2.0.14.2.20060211200157.080c3ff0 () pop ! nycap ! rr ! com
[Download RAW message or body]

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


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

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