Issue
I have recently migrated my project to cmake, and I struggle to build it with my boost dependency in a a subproject. boost is included in my .gitmodules file like this:
[submodule "boost"]
path = dependencies/boost
url = https://github.com/boostorg/boost
and in my CMakeFile I include it like this:
add_subdirectory(dependencies/boost)
However, when building, I get the following error:
[cmake] CMake Error at dependencies/boost/CMakeLists.txt:20 (include):
[cmake] include could not find requested file:
[cmake]
[cmake] BoostRoot
[cmake]
How do I correctly include a dependency in my parent CMakeFile? Which alternatives do you suggest? I would like to have the dependencies as git submodules, so please do not suggest alternatives to that, I would like to transition away from using the system packet manager for that.
Solution
Solved it: Somehow, I forgot to recourse the submodules of boost itself
Answered By - johnworchester Answer Checked By - Marilyn (WPSolving Volunteer)