mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Add -ObjC flag to fix static linking on macOS
Fixes regression introduced in aa3a30c
This commit is contained in:
parent
487c97afaf
commit
8049aa3b75
@ -288,6 +288,12 @@ target_link_libraries(sfml-window PUBLIC SFML::System)
|
||||
# glad sources
|
||||
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include")
|
||||
|
||||
# When static linking on macOS, we need to add this flag for objective C to work
|
||||
# https://developer.apple.com/library/archive/qa/qa1490/_index.html
|
||||
if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOSX)
|
||||
target_link_libraries(sfml-window PRIVATE -ObjC)
|
||||
endif()
|
||||
|
||||
# Vulkan headers
|
||||
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user