forked from speed-dreams/speed-dreams-code
build: Allow setting version string at build.
When retrieving the source from git, the version string is not known in advance, and git is invoked to compute it. In some environments such as Guix, there is no git metadata kept during the build as this would introduce non-determinism; it is thus necessary to be able to manually set the version (which is displayed when the game launches). * CMakeLists.txt (VERSION_LONG): Make it a cache variable, so that users can override it using e.g., -DVERSION:STRING=2.4.0.
This commit is contained in:
parent
c5b0a2b38a
commit
90accd9d4c
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ if(NOT result EQUAL 0)
|
|||
set(VERSION "undefined-version")
|
||||
endif()
|
||||
|
||||
set(VERSION_LONG ${VERSION})
|
||||
set(VERSION_LONG ${VERSION} CACHE STRING "The version string displayed")
|
||||
|
||||
# CMAKE_PROJECT_VERSION_TWEAK is used by NSIS packagers
|
||||
# its what comes after the '-' sign (if anything)
|
||||
|
|
Loading…
Reference in a new issue