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 bed023e commit c4d2d23
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 @@ -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
Expand Down

0 comments on commit c4d2d23

Please sign in to comment.