Imagine an overall project with several components:
Now, let\'s say web
My first thought was to use the CMake import/export target feature.
Have a CMakeLists.txt for basic
, io
and web
and one CMakeLists.txt that references those. You could then use the CMake export feature to export those targets and the application projects could then import the CMake targets.
When you build the library project first the application projects should be able to find the compiled libraries automatically (without the libraries having to be installed to /usr/local/lib
) otherwise one can always set up the proper CMake variable to indicate the correct directory.
When doing it this way a make
in the application project won't do a make
in the library project, you would have to take care of this yourself.