From 8696988d53ea92ef30b39e6be5f72471a2fb95a2 Mon Sep 17 00:00:00 2001 From: jagannatharjun Date: Thu, 1 Oct 2020 21:01:29 +0530 Subject: [PATCH] Fix CMake generated qBittorrent's version string ${qBittorrent_VERSION} will expand to a string that ends with build number but version string from qMake doesn't end with build number --- cmake/Modules/MacroQbtCommonConfig.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/MacroQbtCommonConfig.cmake b/cmake/Modules/MacroQbtCommonConfig.cmake index 72e6f5702..34276a82b 100644 --- a/cmake/Modules/MacroQbtCommonConfig.cmake +++ b/cmake/Modules/MacroQbtCommonConfig.cmake @@ -38,7 +38,12 @@ macro(qbt_common_config) cxx_variable_templates ) - set(QBT_FULL_VERSION "${qBittorrent_VERSION}${QBT_VER_STATUS}") + set(QBT_PROJECT_VERSION "${qBittorrent_VERSION_MAJOR}.${qBittorrent_VERSION_MINOR}.${qBittorrent_VERSION_PATCH}") + if (NOT ${qBittorrent_VERSION_TWEAK} EQUAL 0) + set(QBT_PROJECT_VERSION "${QBT_PROJECT_VERSION}.${qBittorrent_VERSION_TWEAK}") + endif() + + set(QBT_FULL_VERSION "${QBT_PROJECT_VERSION}${QBT_VER_STATUS}") target_compile_definitions(qbt_common_cfg INTERFACE QBT_VERSION="v${QBT_FULL_VERSION}"