diff --git a/CMakeLists.txt b/CMakeLists.txt index 472000585..b4dd2b1eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -320,7 +320,9 @@ endif() if(APPLE) if(SDL2IMAGE_BACKEND_IMAGEIO) - target_link_libraries(SDL2_image PRIVATE -Wl,-framework,ApplicationServices) + if(CMAKE_SYSTEM_NAME MATCHES ".*(Darwin|MacOS).*") + target_link_libraries(SDL2_image PRIVATE -Wl,-framework,ApplicationServices) + endif() target_link_libraries(SDL2_image PRIVATE objc) target_sources(SDL2_image PRIVATE src/IMG_ImageIO.m