Mark external headers as SYSTEM headers
Among other benefits this ensures that the compiler doesn't emit warnings on headers in these paths.
This commit is contained in:
parent
7dfc7f0202
commit
2e6c363e64
@ -247,7 +247,7 @@ if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_MACOSX)
|
||||
endif()
|
||||
|
||||
# Vulkan headers
|
||||
target_include_directories(sfml-window PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan")
|
||||
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan")
|
||||
|
||||
# find and setup usage for external libraries
|
||||
if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||
@ -281,7 +281,7 @@ if(SFML_OS_WINDOWS AND NOT SFML_COMPILER_MSVC)
|
||||
include(CheckIncludeFile)
|
||||
check_include_file(dinput.h DINPUT_H_FOUND)
|
||||
if(NOT DINPUT_H_FOUND)
|
||||
target_include_directories(sfml-window PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/mingw")
|
||||
target_include_directories(sfml-window SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/mingw")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -7,7 +7,8 @@ add_library(sfml-test-main STATIC
|
||||
TestUtilities/GraphicsUtil.hpp
|
||||
TestUtilities/GraphicsUtil.cpp
|
||||
)
|
||||
target_include_directories(sfml-test-main PUBLIC "${PROJECT_SOURCE_DIR}/extlibs/headers" TestUtilities)
|
||||
target_include_directories(sfml-test-main SYSTEM PUBLIC "${PROJECT_SOURCE_DIR}/extlibs/headers")
|
||||
target_include_directories(sfml-test-main PUBLIC TestUtilities)
|
||||
target_link_libraries(sfml-test-main PUBLIC SFML::System)
|
||||
|
||||
# System is always built
|
||||
|
Loading…
Reference in New Issue
Block a user