[CMake] Building shared library from collection?

John Brydon john-comp at blueyonder.co.uk
Tue Feb 9 10:03:45 EST 2010


Hi folks,

first post here as just delving into the world of cmake.

My first question is about the structure of my project. It is like so:

<Project Folder>
             '-> <Module A>
             '-> <Module B>
             '-> <Module C>

 From reading the CMake book it appears I've got 3 options for building.
1) Single makefile at top that lists all the sources with their 
subdirectories.
2) Have each subdirectory build a library that can then be linked at 
then end.
3) Mixture of 1 and 2.

I choose 3 as I wish to have each module as a library and then link the 
3 libraries together to make up the project.
Firstly, does this seem feasible i.e. is my understanding of the book 
correct? Secondly, I managed to build each of
the libraries separately but I am unsure of the syntax of how to link 
them together to create the 'super' library.

Any help or pointers in the right direction would be great.

Cheers,

John.



More information about the CMake mailing list