<div dir="ltr"><div>Hi all, <br></div><div>we are trying to re-design the build system of an existing complex project using cmake.</div>
We have a source tree such this (it is only an example to help explaining the problem)<br>
<br>
.<br>
└── libs<br>
├── CMakeLists.txt <br>
├── libA<br>
│ ├── CMakeLists.txt<br>
│ ├── include<br>
│ │ └── libA.h<br>
│ └── source<br>
│ └── libA.cpp<br>
└── libB<br>
├── CMakeLists.txt<br>
├── include<br>
│ └── libB.h<br>
└── source<br>
└── libB.cpp<br>
<br>
The tree contains libraries and executables and many of them have some dependencies to be<br>
satisfied. We wrote a CMakeLists.txt file on top of the hyerarchy which repetitively uses the<br>
add_directory directive to build every project under it. This solution seems to work well <br>
until a project needs another one to be built; in other words, we did not find out how to deal <br>
with dependencies. Looking at the tree above, we can compile libA but we cannot compile libB without <br>
installing libA because the latter needs it. What's the right and easy way to make a target globally <br><div>
available or at least available for projects on the same level?</div><div><br></div><div>Thanks, <br></div><div>Gabriele<br></div></div>