Commit b32c7955 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Add optional CMake parameter TINY_VERSION.

Parameter setting has the effect on 4th part of the version string in executable's version info on Windows.
It could be set e.g to bzr revno to uniquely identify  different builds for the same major.minor.patch combo.
parent 702a1b9e
...@@ -116,6 +116,10 @@ ENDIF() ...@@ -116,6 +116,10 @@ ENDIF()
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx # Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more info. # for more info.
IF(MSVC) IF(MSVC)
# Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number>
# to bzr revno for example (in the CI builds)
SET(TINY_VERSION "0" CACHE INTERNAL "")
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP) SET(FILETYPE VFT_APP)
......
#include <windows.h> #include <windows.h>
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0 FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,@TINY_VERSION@
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0 PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,@TINY_VERSION@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0 FILEFLAGS 0
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
...@@ -12,8 +12,8 @@ BEGIN ...@@ -12,8 +12,8 @@ BEGIN
BEGIN BEGIN
BLOCK "040904E4" BLOCK "040904E4"
BEGIN BEGIN
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0" VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.@TINY_VERSION@\0"
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0" VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.@TINY_VERSION@\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment