Fix sdl2 CMakeLists.txt on non-apple platforms
All checks were successful
Run tests / Run tests (push) Successful in 7m37s

This commit is contained in:
Nikita Lisitsa 2026-07-09 20:59:48 +03:00
parent a0a1e18162
commit 0d54fa7f03

View file

@ -22,17 +22,22 @@ endif()
if(PSEMEK_GRAPHICS_API STREQUAL OPENGL)
target_link_libraries(psemek-sdl2 PUBLIC psemek-gfx)
elseif(PSEMEK_GRAPHICS_API STREQUAL WEBGPU)
# TODO: shouldn't these come from SDL2 dependencies?
find_library(FOUNDATION_FRAMEWORK Foundation REQUIRED)
find_library(METAL_FRAMEWORK Metal REQUIRED)
find_library(QUARTZCORE_FRAMEWORK QuartzCore REQUIRED)
target_link_libraries(psemek-sdl2
PUBLIC
psemek-wgpu
PRIVATE
${FOUNDATION_FRAMEWORK}
${METAL_FRAMEWORK}
${QUARTZCORE_FRAMEWORK}
)
if(APPLE)
# TODO: shouldn't these come from SDL2 dependencies?
find_library(FOUNDATION_FRAMEWORK Foundation REQUIRED)
find_library(METAL_FRAMEWORK Metal REQUIRED)
find_library(QUARTZCORE_FRAMEWORK QuartzCore REQUIRED)
target_link_libraries(psemek-sdl2
PRIVATE
${FOUNDATION_FRAMEWORK}
${METAL_FRAMEWORK}
${QUARTZCORE_FRAMEWORK}
)
endif()
endif()