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


_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to