Make it possible to suppress the automatic version number in DLLs
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 1 Nov 2012 21:57:33 +0000 (14:57 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 6 Nov 2012 22:52:47 +0000 (23:52 +0100)
qmake automatically appends the library's major version number to the
DLL file name on Windows, as DLL naming doesn't include the version
number on a suffix like on Unix systems.

This flag makes it so qmake skips adding. This will allow us to insert
Qt's major version number at a different position.

Change-Id: I25d471038841fb0c5a34ef6b3bd6266aa33cebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
mkspecs/features/resolve_target.prf
qmake/generators/win32/winmakefile.cpp

index 8a2bd26..455dd3b 100644 (file)
@@ -2,7 +2,7 @@ QMAKE_RESOLVED_TARGET = $$absolute_path($$DESTDIR, $$OUT_PWD)/
 
 win32 {
     contains(TEMPLATE, .*lib) {
-        isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) {
+        !skip_target_version_ext:isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) {
             TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0)
             isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT)
         }
index 33179ab..8bd4537 100644 (file)
@@ -283,7 +283,8 @@ void Win32MakefileGenerator::processVars()
     }
 
     // TARGET_VERSION_EXT will be used to add a version number onto the target name
-    if (project->values("TARGET_VERSION_EXT").isEmpty()
+    if (!project->isActiveConfig("skip_target_version_ext")
+        && project->values("TARGET_VERSION_EXT").isEmpty()
         && !project->values("VER_MAJ").isEmpty())
         project->values("TARGET_VERSION_EXT").append(project->values("VER_MAJ").first());