Imagine the following scenario: Project A is a shared library which has several dependencies (LibA, LibB, and LibC). Project B is an executable that has a dependency on project A, and therefore requires all of Project A's dependencies also in order to build.

Additionally, both projects are built using CMake, and Project A should not need to be installed (via the 'install' target) in order for Project B to use it, as this can become a nuisance to developers.

What is the best way to solve these dependencies using CMake? The ideal solution would be as simple as possible (though no simpler) and require minimal maintenance.

Edit
Report