diff --git a/libs/sdl2/CMakeLists.txt b/libs/sdl2/CMakeLists.txt index 2bdce884..f3d733f5 100644 --- a/libs/sdl2/CMakeLists.txt +++ b/libs/sdl2/CMakeLists.txt @@ -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()