Get patch word automatically (#4372)

This commit is contained in:
Pepe20129 2024-10-11 01:11:10 +02:00 committed by GitHub
parent 4ba5384810
commit 7891ac2d6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,21 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment ve
project(Ship VERSION 8.0.6 LANGUAGES C CXX)
include(CMake/soh-cvars.cmake)
include(CMake/lus-cvars.cmake)
set(PROJECT_BUILD_NAME "MacReady Golf" CACHE STRING "" FORCE)
set(NATO_PHONETIC_ALPHABET
"Alfa" "Bravo" "Charlie" "Delta" "Echo" "Foxtrot" "Golf" "Hotel"
"India" "Juliett" "Kilo" "Lima" "Mike" "November" "Oscar" "Papa"
"Quebec" "Romeo" "Sierra" "Tango" "Uniform" "Victor" "Whiskey"
"Xray" "Yankee" "Zulu"
)
# Get the patch version number from the project version
math(EXPR PATCH_INDEX "${PROJECT_VERSION_PATCH}")
# Use the patch number to select the correct word
list(GET NATO_PHONETIC_ALPHABET ${PATCH_INDEX} PROJECT_PATCH_WORD)
set(PROJECT_BUILD_NAME "MacReady ${PROJECT_PATCH_WORD}" CACHE STRING "" FORCE)
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "" FORCE)
execute_process(