diff options
author | Liang Qi <liang.qi@qt.io> | 2019-08-13 09:46:17 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-08-13 09:46:17 +0200 |
commit | 1dade1bd8ad13a16152aff36351ac570b5b9fdf6 (patch) | |
tree | eafed5710b34c327a98381ca15fe1985a6487b10 /qmake | |
parent | d45908e24292a41ff7838366b34be7340bf9fda5 (diff) | |
parent | fb703aea697b12de4810deec9f8605fd062208bd (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
mkspecs/win32-clang-msvc/qmake.conf
src/corelib/tools/qlist.h
src/gui/painting/qcompositionfunctions.cpp
src/gui/painting/qtriangulator_p.h
src/gui/text/qfontengine_p.h
src/network/kernel/qhostinfo_p.h
src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 10 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 38 |
2 files changed, 38 insertions, 10 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index b271abcee3..3495f97b2c 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -2583,10 +2583,8 @@ \section1 RC_FILE - Specifies the name of the resource file for the application. - The value of this variable is typically handled by - qmake or \l{#QMAKESPEC}{qmake.conf} and rarely - needs to be modified. + Windows only. Specifies the name of the Windows resource file (.rc) for the + target. See \l{Adding Windows Resource Files}. \target RC_CODEPAGE \section1 RC_CODEPAGE @@ -2649,7 +2647,9 @@ \section1 RES_FILE - Specifies the name of the compiled Windows resource file for the target. + Windows only. Specifies the name of the Windows resource compiler's output + file for this target. See \l{RC_FILE} and \l{Adding Windows Resource Files}. + The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 8d1bd08197..8b4f2bf58f 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1447,7 +1447,36 @@ UnixMakefileGenerator::libtoolFileName(bool fixify) void UnixMakefileGenerator::writeLibtoolFile() { + auto fixDependencyLibs + = [this](const ProStringList &libs) + { + ProStringList result; + for (auto lib : libs) { + auto fi = fileInfo(lib.toQString()); + if (fi.isAbsolute()) { + const QString libDirArg = "-L" + fi.path(); + if (!result.contains(libDirArg)) + result += libDirArg; + QString namespec = fi.fileName(); + int dotPos = namespec.lastIndexOf('.'); + if (dotPos != -1 && namespec.startsWith("lib")) { + namespec.truncate(dotPos); + namespec.remove(0, 3); + } else { + debug_msg(1, "Ignoring dependency library %s", + lib.toLatin1().constData()); + continue; + } + result += "-l" + namespec; + } else { + result += lib; + } + } + return result; + }; + QString fname = libtoolFileName(), lname = fname; + debug_msg(1, "Writing libtool file %s", fname.toLatin1().constData()); mkdir(fileInfo(fname).path()); int slsh = lname.lastIndexOf(Option::dir_sep); if(slsh != -1) @@ -1485,12 +1514,11 @@ UnixMakefileGenerator::writeLibtoolFile() << ".a'\n\n"; t << "# Libraries that this one depends upon.\n"; + static const ProKey libVars[] = { "LIBS", "QMAKE_LIBS" }; ProStringList libs; - libs << "LIBS" << "QMAKE_LIBS"; - t << "dependency_libs='"; - for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it) - t << fixLibFlags((*it).toKey()).join(' ') << ' '; - t << "'\n\n"; + for (auto var : libVars) + libs += fixLibFlags(var); + t << "dependency_libs='" << fixDependencyLibs(libs).join(' ') << "'\n\n"; t << "# Version information for " << lname << "\n"; int maj = project->first("VER_MAJ").toInt(); |