mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Add -ObjC flag to fix static linking on macOS
This commit is contained in:
parent
43f57b2f25
commit
9fba1dff27
@ -229,6 +229,11 @@ sfml_add_library(sfml-window
|
||||
SOURCES ${SRC} ${PLATFORM_SRC})
|
||||
target_link_libraries(sfml-window PUBLIC sfml-system)
|
||||
|
||||
# When static linking on macOS, we need to add this flag for objective C to work
|
||||
if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOSX)
|
||||
target_link_libraries(sfml-window PRIVATE -ObjC)
|
||||
endif()
|
||||
|
||||
# find and setup usage for external libraries
|
||||
if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OPENBSD)
|
||||
sfml_find_package(X11 INCLUDE "X11_INCLUDE_DIR" LINK "X11_X11_LIB" "X11_Xrandr_LIB")
|
||||
|
Loading…
Reference in New Issue
Block a user