[CMake] Multiple project

Romain LEGUAY romain.leguay at gmail.com
Mon Jul 9 09:58:37 EDT 2012


Hello everyone,

I have a big project organized like this:
root/
         -> CMakeLists.txt
         CMake/
             --> some .cmake scripts
         lib/
              --> CMakeLists.txt
             include/
             src/
             CMake/
                 --> some .cmake scripts
         apps/
              --> CMakeLists.txt
             A_app/
                     --> CMakeLists.txt
                   src/
                   include/

For now I have "generic" scripts and I must run CMake at the root path. 
This way, when I do some modification in my library and I do a make in 
one of my app, the library is build in first place then the application.

Now I want to have an independent comportment for the library building 
and the applications but I need to keep the former comportment.

I success to build my library with independent way but when I try to 
generate all the makfiles from the root path, it doesn't work: it 
doesn't found different files from my CMAKE_MODULE_PATH I defined in 
root/lib/CMakeLists.txt and in root/CMakeLists.txt.


Is it possible to have this comportment?
Do you have some example or site to help me please?


Thank you.

Regards,
Romain






More information about the CMake mailing list