summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CMakeLists.txt
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-02-13 22:12:22 +0100
committerAki <please@ignore.pl>2022-02-13 22:12:22 +0100
commitdeacd129cc232ad0214e1fdb17912cd27f6c12e6 (patch)
tree62be671f7173c29b7207358be328cf17bd99b47e /Stars45/CMakeLists.txt
parentb548f24de45429537d7b791b4a1b7bd740881914 (diff)
downloadstarshatter-deacd129cc232ad0214e1fdb17912cd27f6c12e6.zip
starshatter-deacd129cc232ad0214e1fdb17912cd27f6c12e6.tar.gz
starshatter-deacd129cc232ad0214e1fdb17912cd27f6c12e6.tar.bz2
Sorted out resource file for Starshatter executable
Diffstat (limited to 'Stars45/CMakeLists.txt')
-rw-r--r--Stars45/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Stars45/CMakeLists.txt b/Stars45/CMakeLists.txt
index 025df81..7f5216d 100644
--- a/Stars45/CMakeLists.txt
+++ b/Stars45/CMakeLists.txt
@@ -1,5 +1,6 @@
project(Stars45)
include(GitDescribe)
+include(GitToResource)
add_executable(
Stars45 WIN32
ActiveWindow.cpp
@@ -296,8 +297,14 @@ target_compile_definitions(
PRIVATE _ALLOW_KEYWORD_MACROS
)
git_describe(VERSION)
+git_to_resource(RC_VERSION ${VERSION})
+configure_file(Stars.rc.conf ${CMAKE_CURRENT_BINARY_DIR}/Stars.rc @ONLY)
configure_file(VersionInfo.cpp.conf ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cpp @ONLY)
-target_sources(Stars45 PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cpp)
+target_sources(
+ Stars45
+ PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/Stars.rc
+ PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cpp
+ )
set_target_properties(Stars45 PROPERTIES OUTPUT_NAME Starshatter)
if(MSVC)
target_include_directories(