My code uses ExternalProject_Add to build dependencies as a superproject and Urho3D is one of them. However, SDL is also one of those projects. If I link both Urho3D and SDL I get linker errors since another version of SDL is already linked with Urho3D…which is totally expected. I cannot just drop SDL from my project, I need it for audio, threading and synchronization, plus I always keep it up to date with SDL2. Same conflict can happen for other dependencies.
There are a couple of workarounds:
-
Add Urho3D CMake install step for dependencies - this is trivial, for every third party lib there can be an install command that copies includes and libs to the CMAKE_INSTALL_PREFIX directory. This way my project can use the SDL library that Urho3D uses.
-
Modify Urho3D CMake to use external dependencies - I don’t really want to force that, I like the way Urho3D currently is - download and build without the headache of having to search for dependencies. However, such modification can also help Urho3D to stay always up to date with say SDL2.
-
Modify my project so it entirely uses Urho3D - I can’t do that within a reasonable time, my project is huge, split on 30-40 subprojects which rely on third party dependencies - SDL, asio, rapidjson, etc.
Ideas are welcome