build: Allow setting version string at build. #54

Merged
xavi merged 1 commit from apteryx/speed-dreams-code:allow-setting-version-string into main 2025-02-01 14:35:17 +01:00
Member

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.
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.
apteryx added 1 commit 2025-02-01 13:54:38 +01:00
build: Allow setting version string at build.
Some checks failed
/ build (debian-sd:stable) (pull_request) Has started running
/ build (ubuntu-sd:jammy) (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
90accd9d4c
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.
xavi approved these changes 2025-02-01 14:34:41 +01:00
xavi left a comment
Owner

LGTM, thanks!

LGTM, thanks!
xavi merged commit dc39345af7 into main 2025-02-01 14:35:17 +01:00
apteryx deleted branch allow-setting-version-string 2025-02-01 15:26:52 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: speed-dreams/speed-dreams-code#54
No description provided.