multiple pathes in cmake variables
Alexander Neundorf
neundorf at kde.org
Sat Feb 11 23:22:29 CET 2006
On Saturday 11 February 2006 22:29, William A. Hoffman wrote:
> At 04:17 PM 2/11/2006, Alexander Neundorf wrote:
> >On Saturday 11 February 2006 21:52, you wrote:
> >> Alexander Neundorf schrieb:
> >> > On Saturday 11 February 2006 19:48, Alexander Neundorf wrote:
> >> >> On Saturday 11 February 2006 19:13, Alexander Neundorf wrote:
> >> >>> On Saturday 11 February 2006 18:46, you wrote:
> >> >>> ...
> >> >>>
> >> >>>> Any better way to deal with like extending FIND_PATH to be able to
> >> >>>> handle path lists ?
> >> >>>
> >> >>> No, I don't think so.
> >> >>> I'll fix the FindFoo.cmake files this evening.
> >> >>
> >> >> I have fixed it locally and am compiling it right now. Once
> >> >> comnpiling has finished (usually it takes something like 80 minutes)
> >> >> I'll commit it. CMAKE_INCLUDE_PATH will then work as you expect, no
> >> >> need to add libxml2/ explicitely to it.
> >> >
> >> > Ok, committed, please test.
> >>
> >> Your last commit 508458 does not work as expected, because there is no
> >> foreach loop in case more than one path is given with
> >> CMAKE_INCLUDE_PATH. I have commited a working version.
> >
> >My version should have worked.
> >How does your CMAKE_INCLUDE_PATH look like and where exactly is xpath.h
> >located on your system ?
>
> How about this:
>
> 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 ?
> 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 ?
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 ?
Bye
Alex
--
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org - http://www.kde.org
alex AT neundorf.net - http://www.neundorf.net
More information about the Kde-buildsystem
mailing list