Skip to content

Commit

Permalink
Renamed GodotCompilerWarnings.cmake to common_compiler_flags.cmake to…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
enetheru committed Sep 18, 2024
1 parent ca062d3 commit b197d23
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
endif ()
endif ()

# Add path to modules
list( APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
include( godotcpp )
include( ${PROJECT_SOURCE_DIR}/cmake/godotcpp.cmake )

# I know this doesn't look like a typical CMakeLists.txt, but as we are
# attempting mostly feature parity with SCons, and easy maintenance, the closer
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cmake/godotcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function( godotcpp_generate )
)
add_library(godot::cpp ALIAS ${PROJECT_NAME})

include(GodotCompilerWarnings)
include(${PROJECT_SOURCE_DIR}/cmake/common_compiler_flags.cmake)

target_compile_features(${PROJECT_NAME}
PRIVATE
Expand Down

0 comments on commit b197d23

Please sign in to comment.