diff options
author | M. Moellney <mail@michaelmoellney.de> | 2015-03-31 17:34:18 +0200 |
---|---|---|
committer | Michael Möllney <mail@michaelmoellney.de> | 2015-04-08 15:47:12 +0000 |
commit | fa1b2dc4a012c3dc11db35f6b33a41d326b820b6 (patch) | |
tree | 0033df66696c6eb11f86c18b853a1de06e3259fa /qmake/doc | |
parent | e63752e6bb886d83af0c22faa673ea4cf99729f0 (diff) |
Fix qmake generating bizarre msvc /VERSION values
The msvc_nmake and msvc_vcproj generators deduced the exe/dll header
version number from the VERSION variable in a "bizarre" way:
VERSION=1.2.3.4567 was converted to /VERSION:1.234567.
But a minor number beyond 65535 is not accepted by the linker.
This fix deduces the major and minor from the major and minor of
VERSION: VERSION=1.2.3.4567 leads to /VERSION:1.2.
In addition, a new variable is introduced: VERSION_PE_HEADER.
With this variable, legacy pro files that rely on the bizarre
behavior can re-create it:
VERSION=1.2.3.45 and VERSION_PE_HEADER=1.2345 lead to the old
result: /VERSION:1.2345 by just taking the VERSION_PE_HEADER to
overrule the new behavior.
Task-number: QTBUG-44823
Change-Id: Ie093ade83290c098fe2b2a429ce5d6ed6dc750ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake/doc')
-rw-r--r-- | qmake/doc/snippets/code/doc_src_qmake-manual.pro | 4 | ||||
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/qmake/doc/snippets/code/doc_src_qmake-manual.pro b/qmake/doc/snippets/code/doc_src_qmake-manual.pro index 857a311e91..be5f979e39 100644 --- a/qmake/doc/snippets/code/doc_src_qmake-manual.pro +++ b/qmake/doc/snippets/code/doc_src_qmake-manual.pro @@ -982,3 +982,7 @@ QMAKE_SONAME_PREFIX = @executable_path/../Frameworks QMAKE_SONAME_PREFIX = @loader_path/Frameworks QMAKE_SONAME_PREFIX = /Library/Frameworks #! [184] + +#! [185] +VERSION_PE_HEADER = 1.2 +#! [185] diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 2def71c723..8c3dc46015 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -2484,6 +2484,16 @@ \snippet code/doc_src_qmake-manual.pro 57 + \section1 VERSION_PE_HEADER + + Windows only. Specifies the version number, that the Windows linker + puts into the header of the .exe or .dll file via the /VERSION option. + Only a major and minor version may be specified. + If VERSION_PE_HEADER is not set, it falls back to + the major and minor version from \l{VERSION} (if set). + + \snippet code/doc_src_qmake-manual.pro 185 + \section1 VER_MAJ Specifies the major version number of the library if the |