Skip to content

Commit b197d23

Browse files
committed
Renamed GodotCompilerWarnings.cmake to common_compiler_flags.cmake to match scons
Included files explicitly by path, as we dont need to append to the CMAKE_MODULES_PATH which effects the whole build tree. This prevents consumers of the library from clobbering the names of the cmake include files and breaking the build.
1 parent ca062d3 commit b197d23

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
1111
endif ()
1212
endif ()
1313

14-
# Add path to modules
15-
list( APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
16-
include( godotcpp )
14+
include( ${PROJECT_SOURCE_DIR}/cmake/godotcpp.cmake )
1715

1816
# I know this doesn't look like a typical CMakeLists.txt, but as we are
1917
# attempting mostly feature parity with SCons, and easy maintenance, the closer
File renamed without changes.

cmake/godotcpp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function( godotcpp_generate )
167167
)
168168
add_library(godot::cpp ALIAS ${PROJECT_NAME})
169169

170-
include(GodotCompilerWarnings)
170+
include(${PROJECT_SOURCE_DIR}/cmake/common_compiler_flags.cmake)
171171

172172
target_compile_features(${PROJECT_NAME}
173173
PRIVATE

0 commit comments

Comments
 (0)