This fixes linking with -Wl,--no-undefined option set, as done by CMake on openSUSE by default.
Link explicitly against SDL2 (for SdlBaseManager) fixing undefined reference to SDL2 functions.
Add SDL2::Main target to FindSDL2, as in the the SDL2 CMake config provided by upstream (and most OS install / ship the SDL2Config.cmake by default).
Also CMAKE_FIND_PACKAGE_PREFER_CONFIG would use that config instead of the shipped FindSDL2 module.
This fixes linking with
-Wl,--no-undefined
option set, as done by CMake on openSUSE by default.Link explicitly against SDL2 (for
SdlBaseManager
) fixingundefined reference to
SDL2 functions. AddSDL2::Main
target to FindSDL2, as in the the SDL2 CMake config provided by upstream (and most OS install / ship the SDL2Config.cmake by default). AlsoCMAKE_FIND_PACKAGE_PREFER_CONFIG
would use that config instead of the shipped FindSDL2 module.