cmake: include directories of (generated) dependencies as SYSTEM

This commit is contained in:
Anonymous Maarten
2023-01-26 00:39:59 +01:00
committed by Sam Lantinga
parent a9650d440a
commit cc0fa00049
2 changed files with 14 additions and 14 deletions

View File

@@ -269,7 +269,7 @@ endif()
if(CYGWIN)
# We build SDL on cygwin without the UNIX emulation layer
target_include_directories(sdl-build-options INTERFACE "/usr/include/mingw")
target_include_directories(sdl-build-options SYSTEM INTERFACE "/usr/include/mingw")
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -mno-cygwin")
check_c_source_compiles("int main(int argc, char **argv) { return 0; }"
@@ -297,7 +297,7 @@ if(USE_GCC OR (USE_CLANG AND NOT MSVC_CLANG))
target_compile_options(sdl-global-options INTERFACE "SHELL:-idirafter \"${SDL3_SOURCE_DIR}/src/video/khronos\"")
endif()
else()
target_include_directories(sdl-global-options INTERFACE "${SDL3_SOURCE_DIR}/src/video/khronos")
target_include_directories(sdl-global-options SYSTEM INTERFACE "${SDL3_SOURCE_DIR}/src/video/khronos")
endif()
# All these ENABLED_BY_DEFAULT vars will default to ON if not specified, so
@@ -1494,7 +1494,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
pkg_search_module(DBUS dbus-1 dbus)
if(DBUS_FOUND)
set(HAVE_DBUS_DBUS_H TRUE)
target_include_directories(sdl-build-options INTERFACE ${DBUS_INCLUDE_DIRS})
target_include_directories(sdl-build-options SYSTEM INTERFACE ${DBUS_INCLUDE_DIRS})
# Fcitx need only dbus.
set(HAVE_FCITX TRUE)
set(HAVE_DBUS TRUE)
@@ -1506,7 +1506,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
find_path(HAVE_SYS_INOTIFY_H NAMES sys/inotify.h)
if(IBUS_FOUND AND HAVE_SYS_INOTIFY_H)
set(HAVE_IBUS_IBUS_H TRUE)
target_include_directories(sdl-build-options INTERFACE ${IBUS_INCLUDE_DIRS})
target_include_directories(sdl-build-options SYSTEM INTERFACE ${IBUS_INCLUDE_DIRS})
set(HAVE_IBUS TRUE)
endif()
endif()
@@ -1519,7 +1519,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
pkg_search_module(INOTIFY libinotify)
if(INOTIFY_FOUND)
set(HAVE_INOTIFY 1)
target_include_directories(sdl-build-options INTERFACE ${INOTIFY_INCLUDE_DIRS})
target_include_directories(sdl-build-options SYSTEM INTERFACE ${INOTIFY_INCLUDE_DIRS})
list(APPEND SDL_EXTRA_LIBS ${INOTIFY_LIBRARIES})
endif()
endif()
@@ -3092,7 +3092,7 @@ if(WARN_ABOUT_ARM_NEON_ASM_MIT)
endif()
if(ANDROID)
target_include_directories(sdl-build-options INTERFACE "${ANDROID_NDK}/sources/android/cpufeatures")
target_include_directories(sdl-build-options SYSTEM INTERFACE "${ANDROID_NDK}/sources/android/cpufeatures")
endif()
if(APPLE)