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:
Samuel Nicholas
2024-12-11 10:40:21 +10:30
parent 47f11bc5c7
commit 6f7293cef4
12 changed files with 181 additions and 125 deletions

View File

@@ -29,13 +29,12 @@ function( android_options )
# Android Options
endfunction()
function( android_generate TARGET_NAME )
function( android_generate )
target_compile_definitions(${TARGET_NAME}
PUBLIC
ANDROID_ENABLED
UNIX_ENABLED
)
common_compiler_flags( ${TARGET_NAME} )
common_compiler_flags()
endfunction()