cmake: don't error on apple when using deprecated declarations

This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2022-10-08 23:41:07 +02:00
1 parent 274ec02581
commit 45da133999
6 files changed
+21 -6

No files matched your search

+8
View File
@@ -686,6 +686,14 @@ if(USE_GCC OR USE_CLANG)
endif()
if(APPLE)
cmake_push_check_state(RESET)
# FIXME: don't use deprecated declarations
check_c_compiler_flag(-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
if(HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
target_compile_options(sdl-build-options INTERFACE "-Wno-error=deprecated-declarations")
endif()
cmake_pop_check_state()
# FIXME: use generator expression instead of appending to EXTRA_LDFLAGS_BUILD
list(APPEND EXTRA_LDFLAGS_BUILD "-Wl,-undefined,error")
list(APPEND EXTRA_LDFLAGS_BUILD "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}")