Is there a best practice for writing CMake file for composition of nodes with subdirectories
Hey there.
The title is kinda long so allow me to explain what it is that I'm trying to do. I have some nodes that I want to compose into the same executable.
The CMakeLists file of each of these nodes uses add_subdirectory
for some in-house infrastracture libraries. Some of these subdirectories are used by some of the wanted nodes for the composition.
The thing is, I couldn't get the composition cmake to build because of these subdirectories. I got all kinds of errors. Is there a general approach to do it? I couldn't find any example.
I was able to fix it by building the nodes as subdirectories of the composition package but there's just got to be a better way.
Can you please share those errors? Furthermore, I encourage posting an MRE.