Merge pull request #1029 from asmaloney/cmake-combine-includes

{cmake} Combine target_include_directories
pull/975/head
Rémi Verschelde 2023-02-07 13:49:25 +01:00
commit 99f6de1dfc
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 8 deletions

View File

@ -40,7 +40,7 @@ project(godot-cpp LANGUAGES CXX)
cmake_minimum_required(VERSION 3.12)
option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON)
option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." OFF)
option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." ON)
# Default build type is Debug in the SConstruct
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
@ -180,13 +180,6 @@ endif ()
target_include_directories(${PROJECT_NAME} ${GODOT_CPP_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC
include
${CMAKE_CURRENT_BINARY_DIR}/gen/include
)
unset( GODOT_CPP_SYSTEM_HEADERS_ATTRIBUTE )
# Put godot headers as SYSTEM PUBLIC to exclude warnings from irrelevant headers
target_include_directories(${PROJECT_NAME}
SYSTEM PUBLIC
${GODOT_GDEXTENSION_DIR}
)