cmake: append to COMPILE_FLAGS property

This commit is contained in:
Anonymous Maarten 2022-10-06 05:04:51 +02:00 committed by Anonymous Maarten
parent 68e20501d6
commit 1064fdee8c

View File

@ -2004,7 +2004,7 @@ elseif(APPLE)
set(SDL_FRAMEWORK_COREHAPTICS 1) set(SDL_FRAMEWORK_COREHAPTICS 1)
else() else()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
set_source_files_properties(${MFI_JOYSTICK_SOURCES} PROPERTIES COMPILE_FLAGS -fobjc-weak) set_property(SOURCE ${MFI_JOYSTICK_SOURCES} APPEND_STRING PROPERTY COMPILE_FLAGS " -fobjc-weak")
check_objc_source_compiles(" check_objc_source_compiles("
#include <AvailabilityMacros.h> #include <AvailabilityMacros.h>
#include <TargetConditionals.h> #include <TargetConditionals.h>