I have the following conditions:
- I am using SDL2 (sources) as dependency directly from github mirror by using git submodules
- Also i am using SDL2_image (sources) as similar dependency
- My cmake project includes both deps with
add_subdirectory
Problem here is that SDL2_image is trying to find SDL2 with find_package, but as i mentioned i am building SDL2 alongside with my project, so find_package fails to find it in the system. After that i am setting SDL2_DIR pointing to the correct directory, but SDL2Config.cmake inside one of the most popular unofficial repos are just including invalid file and thus breaks all project.
Question is. How i can nicely solve this issue? I have all my deps built from sources alongside the project and it works nice. Of course i can build SDL2_image and include binaries separately, but this is not a nice solution in my opinion.