mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-04 11:15:39 +00:00
Harmonise passing build version
Avoid running some configure step, instead pass it as a define like the Makefile
This commit is contained in:
1 parent
292c297518
commit
5c4ca36c5a
3 files changed
+2
-10
No files matched your search
@@ -25,13 +25,6 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
// This variable is passed via `-D` from the Makefile, but not from CMake
|
||||
// (in which `configure_file()` is used on this file to replace some syntax)
|
||||
#ifndef BUILD_VERSION_STRING
|
||||
// CMake-specific syntax here
|
||||
#define BUILD_VERSION_STRING "@GIT_REV@"
|
||||
#endif
|
||||
|
||||
char const *get_package_version_string() {
|
||||
if constexpr (literal_strlen(BUILD_VERSION_STRING) > 0) {
|
||||
return BUILD_VERSION_STRING;
|
||||
|
||||
Reference in new issue
Block a user