cmake: append to COMPILE_FLAGS property
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc4510a..5867e5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2004,7 +2004,7 @@ elseif(APPLE)
set(SDL_FRAMEWORK_COREHAPTICS 1)
else()
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("
#include <AvailabilityMacros.h>
#include <TargetConditionals.h>