[CMake] Question regarding project structure

David Aldrich David.Aldrich at EU.NEC.COM
Thu Sep 16 06:45:05 EDT 2010


Hi

I have now successfully configured CMakeLists files to create some of our static and dynamic libraries using CMake.  I would now like some advice on how to configure these separate build files as a single project.

Here's what our current folder structure is like:

Trunk ------- Kernel      <==== a static library containing main()
         |
         |--- DynLibs     <==== containg multiple folders containing
         |                      proprietary source code, each folder
         |                      builds one shared library
         |
         |--- MyExe       <==== contains top-level makefile that
                                a) links Kernel static library into an .exe
                                b) calls makefiles for the dynamic libraries

This structure may not be ideal from a CMake standpoint, but I would like to maintain it to ease the transition from pure gnu make to CMake.

What would I need to put in the top-level CMakeLists file (MyExe/CMakeLists.txt) to reference the other CMakeLists files?

Should each CMakeLists file have its own Project name, or should they all be the same?

Any advice would be much appreciated.

Best regards

David


More information about the CMake mailing list