summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CMakeLists.txt
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-02-13 16:14:39 +0100
committerAki <please@ignore.pl>2022-02-13 16:14:39 +0100
commitbd8ea14907ab75c1ed77e38889fbd027d6c5aed7 (patch)
treec34f46b2d3f2e05d0ae49e123f23b6cb606a2a7c /Stars45/CMakeLists.txt
parent80e8aa8e874a6c5c2e3af25a2e0b9bbc6ce125d8 (diff)
downloadstarshatter-bd8ea14907ab75c1ed77e38889fbd027d6c5aed7.zip
starshatter-bd8ea14907ab75c1ed77e38889fbd027d6c5aed7.tar.gz
starshatter-bd8ea14907ab75c1ed77e38889fbd027d6c5aed7.tar.bz2
Starshatter versions are now generated based on information from git
Diffstat (limited to 'Stars45/CMakeLists.txt')
-rw-r--r--Stars45/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Stars45/CMakeLists.txt b/Stars45/CMakeLists.txt
index 9703810..025df81 100644
--- a/Stars45/CMakeLists.txt
+++ b/Stars45/CMakeLists.txt
@@ -1,4 +1,5 @@
project(Stars45)
+include(GitDescribe)
add_executable(
Stars45 WIN32
ActiveWindow.cpp
@@ -294,6 +295,9 @@ target_compile_definitions(
Stars45
PRIVATE _ALLOW_KEYWORD_MACROS
)
+git_describe(VERSION)
+configure_file(VersionInfo.cpp.conf ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cpp @ONLY)
+target_sources(Stars45 PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cpp)
set_target_properties(Stars45 PROPERTIES OUTPUT_NAME Starshatter)
if(MSVC)
target_include_directories(