From 2310d9dc65b4d69e04e4aaa4f393722b7fff653d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 15 Jan 2020 12:56:15 +0100 Subject: qmake: Allow the use of a response file when building a library Change b274f656b82e06fad492e241dae6ae65cb377ad1 enabled the use of a response file for application building specifically needed when building an application for Android on Windows. The same cause can happen when building a library too with a lot of object files, so the command for the link step can be too long. So we expand the functionality to be used for libraries too. Task-number: QTBUG-71940 Change-Id: Ia6d1943bf33f6decb53f6e71a8dc65310d2f20a1 Reviewed-by: Joerg Bornemann --- qmake/generators/unix/unixmake2.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmake/generators') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 550fa9d834..91470fb129 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -558,6 +558,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << destdir_d << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") << ' ' << incr_deps << " $(SUBLIBS) " << target_deps << ' ' << depVar("POST_TARGETDEPS"); } else { + ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD"); + cmd[0] = cmd.at(0).toQString().replace(QLatin1String("$(OBJECTS)"), objectParts.second); t << destdir_d << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps << ' ' << depVar("POST_TARGETDEPS"); -- cgit v1.2.3 From 81bd1bba7b67716ed0ae565061ebedc5a5455a40 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 12 Feb 2020 15:27:27 +0100 Subject: Windows: Add install/uninstall rules for target.targets Mirror the behavior in unixmake.cpp and do actually install /uninstall files in target.targets. This fixes the installation of .debug files on MinGW for a Qt with -force-debug-info -separate-debug-info. [ChangeLog][qmake] Install/uninstall rules are now generated for target.targets on Windows. This mirrors the behavior on Unix. Fixes: QTBUG-81354 Change-Id: Ie9366f132ebd8e18680f32f2e52cec64dbd87e9a Reviewed-by: Joerg Bornemann --- qmake/generators/win32/winmakefile.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'qmake/generators') diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 86d10c213c..3ec2704625 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -736,6 +736,18 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) if(targetdir.right(1) != Option::dir_sep) targetdir += Option::dir_sep; + const ProStringList &targets = project->values(ProKey(t + ".targets")); + for (int i = 0; i < targets.size(); ++i) { + QString src = targets.at(i).toQString(), + dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1))); + if (!ret.isEmpty()) + ret += "\n\t"; + ret += "$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst; + if (!uninst.isEmpty()) + uninst.append("\n\t"); + uninst.append("-$(DEL_FILE) " + dst); + } + if(t == "target" && project->first("TEMPLATE") == "lib") { if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { @@ -744,6 +756,8 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) if(slsh != -1) dst_prl = dst_prl.right(dst_prl.length() - slsh - 1); dst_prl = filePrefixRoot(root, targetdir + dst_prl); + if (!ret.isEmpty()) + ret += "\n\t"; ret += installMetaFile(ProKey("QMAKE_PRL_INSTALL_REPLACE"), project->first("QMAKE_INTERNAL_PRL_FILE").toQString(), dst_prl); if(!uninst.isEmpty()) uninst.append("\n\t"); -- cgit v1.2.3