[CMake] Writing cmake files for modules
Asmodehn Shade
asmodehn at gmail.com
Mon Jun 26 23:37:15 EDT 2006
Hi,
I am writing a small set of libraries, and I like to use cmake to detect and
configure them.
I am still a bit lost among the possibility, and I was wondering what is the
right way to do it.
Let say I have libA and libB, with A depending on B, and B can be built with
different options.
>From what I understod so far, my file hierarchy should be something like :
- A/
- CMakeLists.txt
- CMake/
- FindA.cmake
- B/
- CMakeLists.txt
- CMake/
- FindB.cmake
- BConfig.cmake
Correct ?
I would like CMake to setup easily my development environement on different
platforms, but there are different case.
Here is what I understand I should do from the documentation :
- lib B has been built and installed : I provide a FindB.cmake to be used by
A/CMakeLists.txt, found using CMAKE_MODULE_PATH, right ?
- lib B has been built but not installed : I provide a BConfig.Cmake to be
used by A/CMakeLists.txt, found how ? B_DIR ?
- lib B hasnt been built : how do I trigger the build from A/CMakeLists.txt
?
Where the configuration of the build of B should be ? in BConfig.cmake ? in
a specific cmake-modified header ?
NB : A and B are two distinct projects, because B can be used in an
independent way...
Thank you for your help,
--
Asmodehn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060627/fbf0b7a5/attachment.html
More information about the CMake
mailing list