Cmake config is not properly set up. You have to manually point IMPORTED_IMPLIB target to the import library file in your CMakeLists.txt:
if(TARGET SDL2::SDL2)
get_target_property(SDL2_LOCATION SDL2::SDL2 IMPORTED_LOCATION)
set_target_properties(SDL2::SDL2 PROPERTIES IMPORTED_IMPLIB "/usr/x86_64-w64-mingw32/lib/libSDL2.dll.a")
endif()
Pinned Comments