Simplify SYSTEM_NAME generator expression.

previous version created a list, which is semicolon delimited and then string REPLACED the semicolon to create a single string.
New version uses string APPEND to create the string the first time.
pull/1683/head
Samuel Nicholas 2024-12-29 10:45:28 +10:30
parent befe3ee2f2
commit 9685147a16
1 changed files with 8 additions and 9 deletions

View File

@ -240,16 +240,15 @@ function( godotcpp_generate )
### Platform is derived from the toolchain target
# See GeneratorExpressions PLATFORM_ID and CMAKE_SYSTEM_NAME
set( SYSTEM_NAME
$<$<PLATFORM_ID:Android>:android>
$<$<PLATFORM_ID:iOS>:ios>
$<$<PLATFORM_ID:Linux>:linux>
$<$<PLATFORM_ID:Darwin>:macos>
$<$<PLATFORM_ID:Emscripten>:web>
$<$<PLATFORM_ID:Windows>:windows>
$<$<PLATFORM_ID:Msys>:windows>
string( APPEND SYSTEM_NAME
"$<$<PLATFORM_ID:Android>:android.${ANDROID_ABI}>"
"$<$<PLATFORM_ID:iOS>:ios>"
"$<$<PLATFORM_ID:Linux>:linux>"
"$<$<PLATFORM_ID:Darwin>:macos>"
"$<$<PLATFORM_ID:Emscripten>:web>"
"$<$<PLATFORM_ID:Windows>:windows>"
"$<$<PLATFORM_ID:Msys>:windows>"
)
string(REPLACE ";" "" SYSTEM_NAME "${SYSTEM_NAME}")
### Use the arch from the toolchain if it isn't set manually
if( GODOT_ARCH )