[CMake] How does find_package work?
David Doria
daviddoria at gmail.com
Wed Feb 25 12:30:20 EST 2009
To include VXL, I do this:
FIND_PACKAGE(VXL REQUIRED)
INCLUDE(${VXL_CMAKE_DIR}/UseVXL.cmake)
How can I make my projects work like that? Say I have a /Projects/Images
folder that has a project including a CMakeLists.txt file. Then I start a
project /Projects/NewProject and I want to use some stuff from the Images
project. Now I have to do this:
set(Images /home/user/src/Projects/Images)
set(ImagesSources
${Images}/Angles.cpp
${Images}/Color.cpp
${Images}/Ray.cpp
)
Or something like that - and clearly that would not work if I went to a
different computer and had the Images directory in a different location.
How could I "find" it?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090225/e001a837/attachment.htm>
More information about the CMake
mailing list