[CMake] CMake, including internal libraries with subdirs
Julien Michel
julien.michel at c-s.cnes.fr
Fri Aug 1 09:18:05 EDT 2008
Dear CMake users,
Let assume that I have two libraries, A and B. These two libraries are
built with CMake. A is the library I am developping, and it relies on B.
Of course I use FIND_PACKAGE(B) to tell CMake to look for B when building A.
Now, I would like my users to have less libraries to compile before
compiling A. So I decide to put B in the A source tree, in Utilities/B/
for instance. And of course I use the cmake instruction SUBDIRS(B) to
tell cmake to look in that directory.
Is that sufficient to include B in A building process ? Will all the B
cmake options be reported in the cmake GUI when configuring A ? Is there
anything else to add in A CMakeLists.txt to ensure proper installation
and usability of A ?
Currently we did something like that but we had to move some options
from B CMakeLists.txt to A CmakeLists.txt, and to modify some of A and B
files like IncludeDirectories.cmake also. I think we might have missed
something, I would have expected CMake to be able to build and install
recursively libraries.
Thanks a lot for this great tool, and for any answer,
Julien Michel
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel at c-s.fr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the CMake
mailing list