From 125b13a52465640751a195182b2ddef0a39e0ebc Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Sat, 22 Oct 2022 13:41:35 +0200 Subject: [PATCH] automated version generation --- CMakeLists.txt | 5 +++++ Version.h => Version.h.in | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) rename Version.h => Version.h.in (72%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78f1dd2..9ed606c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,11 @@ IF (MSVC) ADD_DEFINITIONS(/D_USRDLL) ENDIF () +CONFIGURE_FILE( + ${CMAKE_SOURCE_DIR}/Version.h.in + ${CMAKE_BINARY_DIR}/Version.h +) + # add the binary, include and installation directories to the search paths INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} diff --git a/Version.h b/Version.h.in similarity index 72% rename from Version.h rename to Version.h.in index 7505eb0..ed3c19d 100644 --- a/Version.h +++ b/Version.h.in @@ -2,7 +2,7 @@ namespace { const char *PLUGIN_NAME{ "vACDM" }; -const char *PLUGIN_VERSION{ "0.0.0" }; +const char *PLUGIN_VERSION{ "@CMAKE_PROJECT_VERSION@" }; const char *PLUGIN_AUTHOR{ "-" }; const char *PLUGIN_LICENSE{ "-" }; const char* WEBAPI_VERSION{ "10" };