From 565b6bd6354f9edd63e493aa41087550b4e08ae5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Nov 2012 14:57:33 -0700 Subject: [PATCH] Make it possible to suppress the automatic version number in DLLs 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 --- mkspecs/features/resolve_target.prf | 2 +- qmake/generators/win32/winmakefile.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 8a2bd26..455dd3b 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -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) } diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 33179ab..8bd4537 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -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()); -- 2.7.4