I have a project with cmake as its build system. I want project's dependencies to be pulled as git submodules and their build process to be integrated into one cmake build process for whole project.
If a dependency is also using cmake as it's build system it's pretty much easy - using ExternalProject_Add
. I was able to integrate such a dependency already (SDL).
However what should I do if my dependency don't use cmake? In my case those would be lua and bgfx for example. What are possible ways to organize everything with such case in mind? Should I write and maintain CMakeLists.txt files for such projects myself, with somewhat ugly source references like ../../bgfx/src/main.cpp
for each such dependency and making a folder for each such CMakeLists.txt file to refer to this folder with ExternalProject_Add
? Or there might be some other ways?