Read the version from build_scripts/compile_version_string.txt
The CMake build had the version hard-coded as 5.7.4, while the qmake build read it from compile_version_string.txt (5.8.17-release). The stale number also made the version check report an update. As in the qmake build, the full string becomes APPLICATION_VERSION and its numeric part the project version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bde675f1b8
commit
3ed686dec5
+10
-2
@@ -1,5 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(AdvancedSettings VERSION 5.7.4 LANGUAGES CXX)
|
||||
|
||||
# The version comes from build_scripts/compile_version_string.txt, as in the
|
||||
# qmake build (e.g. "5.8.17-release"): the full string becomes
|
||||
# APPLICATION_VERSION (shown in the UI, compared by the version check), the
|
||||
# numeric part before "-" the project version.
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/build_scripts/compile_version_string.txt"
|
||||
OVRAS_VERSION_STRING LIMIT_COUNT 1)
|
||||
string(REGEX REPLACE "-.*$" "" OVRAS_VERSION_NUMBER "${OVRAS_VERSION_STRING}")
|
||||
project(AdvancedSettings VERSION ${OVRAS_VERSION_NUMBER} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
@@ -292,7 +300,7 @@ if(NOT WIN32 AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(AdvancedSettings PRIVATE
|
||||
APPLICATION_VERSION=\"${PROJECT_VERSION}\"
|
||||
APPLICATION_VERSION=\"${OVRAS_VERSION_STRING}\"
|
||||
)
|
||||
|
||||
# Vulkan render backend (src/render/VulkanRenderBackend.*), selected at run
|
||||
|
||||
Reference in New Issue
Block a user