[CMake] find_path for multiple files

Guillaume Duhamel guillaume.duhamel at gmail.com
Thu Mar 4 17:27:08 EST 2010


I ended up writing my own macro to do the job:
http://code.google.com/p/soupcon/source/browse/trunk/findxul/FMP.cmake
there's also some usage example in my FindXUL module:
http://code.google.com/p/soupcon/source/browse/trunk/findxul/FindXUL.cmake

That's a bit more complex than what I described as it's able to find
multiple groups of files in multiple groups of possible paths +
path_suffixes.
That's my first time at writing CMake modules so I guess I did a number of
things wrong, but at least it's working enough to compile my XUL based app
on linux / mac / windows :)

There's at least one thing I really don't like about that macro though, it
generates too many variables in the cache. There's NxM find_path calls (with
N being the number of file to find and M the number of path groups), each
one generating a cache variable and those variable are just "temporary"
variables.
Is there any way to clean those useless cache variables?

Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100304/99642c25/attachment.htm>


More information about the CMake mailing list