I’m trying to get the emulator hatari (Hatari · GitHub) to cross compile with SDL2’s own CMake script instead of the projects own.
find_package(SDL2 REQUIRED) does not fail, but soon I see this:
CMake Error at src/CMakeLists.txt:15 (add_library):
Target "Floppy" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/CMakeLists.txt:145 (add_executable):
Target "hatari" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/debug/CMakeLists.txt:10 (add_library):
Target "Debug" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/falcon/CMakeLists.txt:6 (add_library):
Target "Falcon" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/gui-sdl/CMakeLists.txt:8 (add_library):
Target "GuiSdl" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at src/cpu/CMakeLists.txt:89 (add_library):
Target "UaeCpu" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at tools/hmsa/CMakeLists.txt:12 (add_executable):
Target "hmsa" links to target "SDL2::SDL2" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
Before hatari deleted their own FindSDL cmake script, it compiled without problems. So the question is if something is wrong with the CMake files in hatari, or in SDL2. Is there anyone here who can shed some light?