Skip to content

Commit

Permalink
cmake: add -Wl,-framework,ApplicationServices only for macOS
Browse files Browse the repository at this point in the history
Backport of ee91574
  • Loading branch information
madebr committed Dec 7, 2024
1 parent 251cdd8 commit 4d1f357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ set(SDL2IMAGE_IMAGEIO_ENABLED FALSE)
if(APPLE)
if(SDL2IMAGE_BACKEND_IMAGEIO)
set(SDL2IMAGE_IMAGEIO_ENABLED TRUE)
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
Expand Down

0 comments on commit 4d1f357

Please sign in to comment.