[CMake] What does `cross-platform' mean?

Alexander Neundorf a.neundorf-work at gmx.net
Mon Nov 10 15:37:42 EST 2008


On Monday 10 November 2008, Bill Hoffman wrote:
> Jed Brown wrote:
> > Thanks Bill.  I'm very encouraged by the response this thread has
> > generated and optimistic that the Find* modules will become more robust
> > without undue effort by module writers.
>
> Well, it is not going to happen over night, but I think we are closer to
> a plan.  I am going to update the wiki with the main three ideas of this
> thread so it does not get lost.
>
> - Standard FOO_DIR for find modules, but environment and cache.
> Environment works like CC and CXX do.

CMake already uses this when searching for FOOConfig.cmake files.
How should it behave ?
It could be done manually, i.e. every module has to have some code like that:

find_path(FOO_INCLUDE_DIR foo.h HINTS ${FOO_DIR}/include )
Same for find_library().
This wouldn't require a lot (any ?) work in cmake. But it would be a bit ugly 
for searching libs (sometimes in lib, lib32 or lib64).

Or should the find_library() etc. calls check automatically whether they are 
called from some FindFoo.cmake module and check for the respective variable 
automatically ?

Alex


More information about the CMake mailing list