Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e12873fa2..9935985cc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -204,7 +204,24 @@ if (UNIX AND NOT APPLE)
target_link_libraries(keepassx_core Qt5::DBus)
endif()
-add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
+if(MINGW)
+ string(REPLACE "." ";" VERSION_LIST ${KEEPASSXC_VERSION})
+ list(GET VERSION_LIST 0 KEEPASSXC_VERSION_MAJOR)
+ list(GET VERSION_LIST 1 KEEPASSXC_VERSION_MINOR)
+ list(GET VERSION_LIST 2 KEEPASSXC_VERSION_PATCH)
+
+ include(GenerateProductVersion)
+ generate_product_version(
+ WIN32_ProductVersionFiles
+ NAME "KeePassXC"
+ COMPANY_NAME "KeePassXC Team"
+ VERSION_MAJOR ${KEEPASSXC_VERSION_MAJOR}
+ VERSION_MINOR ${KEEPASSXC_VERSION_MINOR}
+ VERSION_PATCH ${KEEPASSXC_VERSION_PATCH}
+ )
+endif()
+
+add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE} ${WIN32_ProductVersionFiles})
target_link_libraries(${PROGNAME} keepassx_core)
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)