mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-06 06:10:06 +03:00
Alleviate CMake target name clashes, visibility, and grouping.
Simplify <platform>_generate cmake function signature, as TARGET_ALIAS and TARGET_NAME are still in scope and do not need to be passed. Add USE_FOLDERS, and FOLDER properties to group targets in VS and XCode Guard test target with GODOT_ENABLE_TESTING Generate all three variants in the form godot-cpp.test.<target> to remove the -DTEST_TARGET option clutter. Update the docs/cmake.rst with information about the testing target Update the Github CI
This commit is contained in:
@@ -38,6 +38,7 @@ The CMake equivalent is below.
|
||||
]=======================================================================]
|
||||
|
||||
include( cmake/godotcpp.cmake )
|
||||
|
||||
godotcpp_options()
|
||||
|
||||
#[[ Python is required for code generation ]]
|
||||
@@ -53,5 +54,12 @@ project( godot-cpp
|
||||
compiler_detection()
|
||||
godotcpp_generate()
|
||||
|
||||
# Test Example
|
||||
add_subdirectory( test )
|
||||
# Conditionally enable the godot-cpp.test.<target> integration testing targets
|
||||
if( GODOT_ENABLE_TESTING )
|
||||
add_subdirectory( test )
|
||||
endif()
|
||||
|
||||
# If this is the top level CMakeLists.txt, Generators which honor the
|
||||
# USE_FOLDERS flag will organize godot-cpp targets under the subfolder
|
||||
# 'godot-cpp'. This is enable by default from CMake version 3.26
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
Reference in New Issue
Block a user