summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--installer/opentrack-installer.iss2
-rw-r--r--opentrack-version.h6
3 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08d1f64a..2f999144 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -574,6 +574,8 @@ if(UNIX)
endif()
add_executable(opentrack ${opentrack-win32-executable} ${opentrack-bin-c} ${opentrack-bin-h} ${opentrack-bin-moc} ${opentrack-bin-uih} ${opentrack-bin-rcc})
set_target_properties(opentrack PROPERTIES COMPILE_DEFINITIONS OPENTRACK_VERSION=\"${OPENTRACK__COMMIT}\")
+set(OPENTRACK_COMMIT_VERSION \"${OPENTRACK__COMMIT}\")
+configure_file("${CMAKE_SOURCE_DIR}/opentrack-version.h" "${CMAKE_BINARY_DIR}/opentrack-version.h" @ONLY NEWLINE_STYLE UNIX)
if(UNIX)
target_link_libraries(opentrack opentrack-qxt-mini)
endif()
diff --git a/installer/opentrack-installer.iss b/installer/opentrack-installer.iss
index ca04af71..5e3a547d 100644
--- a/installer/opentrack-installer.iss
+++ b/installer/opentrack-installer.iss
@@ -1,7 +1,7 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-#include "../opentrack-version.h"
+#include "../build/opentrack-version.h"
#define MyAppName "opentrack"
#define MyAppVersion OPENTRACK_VERSION
#define MyAppPublisher "opentrack"
diff --git a/opentrack-version.h b/opentrack-version.h
index 1b941000..f31d5edf 100644
--- a/opentrack-version.h
+++ b/opentrack-version.h
@@ -1,3 +1,7 @@
#ifndef OPENTRACK_VERSION
-# define OPENTRACK_VERSION "Mourns-For-Trees"
+# define OPENTRACK_VERSION @OPENTRACK_COMMIT_VERSION@
+#else
+# ifndef OPENTRACK_VERSION
+# define OPENTRACK_VERSION "Mourns-For-Trees"
+# endif
#endif