Can anyone comment on the most common way to aggregate together multiple projects built using cmake into some larger structure?<br><br>Lets say I have 3 tools, foo, bar and baz. <br><br>foo is standalone and has a toplevel CMakeLists.txt with a PROJECT(FOO)<br>
<br>bar is standalone  and has a toplevel CMakeLists.txt with a PROJECT(BAR)<br><br>baz requires foo to be built (there are many other uses of foo as well) and used during build of baz (ie. generating some custom inputs).<br>
<br>And then we want to build a top level system project that causes all the other tools to be built and packaged together. From the FAQ I can see how to use custom commands to use a generated executable and process files during the build of a project, with correct dependency tracking.<br>
<br>Any pointers on how to deal with aggregating multiple projects like this? A naive <br><br>add_subdirectory(/home/bill/bar ${PROJECT_BINARY_DIR}/bar)<br><br>runs into fairly sensible problems due to add_subdirectory commands within the subsidiary project CMakeLists...<br>
<br>CMake Error at /home/bill//bar/CMakeLists.txt:18 (ADD_SUBDIRECTORY):<br>&nbsp; add_subdirectory given source &quot;/home/bill/baz/impl&quot; which is not an<br>&nbsp; existing directory.<br><br>?<br><br>thanks<br>b.<br><br><br>
<br>