gnuwin32 related cmake patches

Ralf Habacker ralf.habacker at freenet.de
Thu Feb 16 09:25:11 CET 2006


David Faure schrieb:
> On Wednesday 15 February 2006 21:14, Ralf Habacker wrote:
>   
>> Hi all,
>>
>> I've just tried to run recent cmake cvs version with recent kdelibs 
>> sources and recognized, that some gnuwin32 packages are not detected, 
>> because the related tests does not use the GNUWIN32_DIR variable.
>>
>> The appended patch and files fixes this issue.
>>     
>
> For Mac OS X, instead of adding /sw/lib and /sw/include to all find_library tests
> (which can't be done in the tests provided by cmake itself), we simply do
> "cmake -DCMAKE_INCLUDE_PATH:string=/sw/include -DCMAKE_LIBRARY_PATH:string=/sw/lib"
> Maybe we could put this into some wrapper script, and on gnuwin32 use the gnuwin32 paths there?
>
>   
For windows there is already a gnuwin32 package finder, which requires 
no additional path name settings and was used already for libxml2. 
Because there are more gnuwin32 provided packages 
(jpeg,gif,openssl,xslt,pcre), for which it make sense to use the 
gnuwin32 package finder also.

My question is if thereis  a way to lift up the currently platform 
specific way the gnuwin32 library path are handles to a platform 
independent way ? I'm asking because many cmake find modules has for 
example /usr/include /usr/local/include as default setting, which are 
platform specific (linux sure and perhaps MAC OSX, I don't know).
For windows this pathes are completly obsolate.

If there would be a for example a OS_INCLUDE_PATH or OS_LIBRARY_PATH, 
which will be set in a platform dependent manner by related FIND 
modules, this ones could be used by all.

linux:
OS_INCLUDE_PATH=/usr/include:/usr/local/include:<result from other linux 
basic include path finders>
OS_LIBRARY_PATH=/usr/lib:/usr/local/lib:<result from other linux basic 
library path finders>

Mac OSX:
OS_INCLUDE_PATH=/usr/include:/usr/local/include:/sw/lib:<result from 
other MAC OSX basic include path finders>
OS_LIBRARY_PATH=/usr/lib:/usr/local/lib:/sw/lib:<result from other MAC 
OSX basic library path finders>

Windows:
OS_INCLUDE_PATH=<result from the FINDGNUWIN32-include path 
finder>;<result from other Windows basic include path finders>
OS_LIBRARY_PATH=<result from the FINDGNUWIN32-library path 
finder>;<result from other Windows basic library path finders>

May be there is a better way for this by using 
CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH or similar, which could be set 
internal by related FIND modules.

just my 2 cent.

Ralf



More information about the Kde-buildsystem mailing list