From ee91574696dadc386e708ed4f0c5bbd89798426e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 7 Dec 2024 01:48:17 +0100 Subject: [PATCH] cmake: add -Wl,-framework,ApplicationServices only for macOS --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b2f681..4211753b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,7 +355,9 @@ set(SDLIMAGE_IMAGEIO_ENABLED FALSE) if(APPLE) if(SDLIMAGE_BACKEND_IMAGEIO) set(SDLIMAGE_IMAGEIO_ENABLED TRUE) - target_link_libraries(${sdl3_image_target_name} PRIVATE -Wl,-framework,ApplicationServices) + if(CMAKE_SYSTEM_NAME MATCHES ".*(Darwin|MacOS).*") + target_link_libraries(${sdl3_image_target_name} PRIVATE -Wl,-framework,ApplicationServices) + endif() target_link_libraries(${sdl3_image_target_name} PRIVATE objc) target_sources(${sdl3_image_target_name} PRIVATE src/IMG_ImageIO.m