Reputation: 663
I want a repo of C++ source code that is built into several static libraries. The idea is that this repo is then included in another project as a submodule, and those libraries are included in the final executable as a dependency.
To build the repo into libraries, I first need to compile some google protocol buffer IDL files into C++ source code, which is subsequently compiled into the libraries.
So my library build process needs to follow this order:
It must follow this order otherwise the static library compilation will fail, because the source code from IDL compilation will not have been generated.
I have seen posts like this How to control subdirectory compiling order of cmake? and Specify order for building subdirectories CMake but they seem to address linking ordering, but my problem is order of compilation.
Can someone provide a simple example of how my CMakeLists.txt file should look to achieve the above?
Upvotes: 0
Views: 43