Issue
I manage my dependencies using git submodules, and build my project using cmake. So far, this works rather well with all dependencies, except one (WebKit, I need it from source because I have to change some parts of it). The project uses "CMAKE_SOURCE_DIR", ... all over the place, which results in the SOURCE_DIR of the parent project, thus, cmake fails in the configuration phase.
Is there a better way to include larger and more complex projects in a parent cmake project? I would like an approach that encapsulates the sub-project better, so that these issues cannot throw up any more.
Solution
I would consider the use of CMAKE_SOURCE_DIR
in WebKit a bug. They should use PROJECT_SOURCE_DIR
. See Fraser's answers for more details.
You might try to patch WebKit's code after checkout, prior to running CMake.
Additionally, you could open an issue to ask the developers to improve this. Or even better, create a pull request.
Answered By - usr1234567 Answer Checked By - Mildred Charles (WPSolving Admin)