Skip to content

Commit

Permalink
cmake: add -Wl,-framework,ApplicationServices only for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Dec 7, 2024
1 parent c81d5e5 commit ee91574
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 @@ -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
Expand Down

0 comments on commit ee91574

Please sign in to comment.