From 2634ba5b4da5e315f4b0d396d8f8ab3cc48d9c8e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Dec 2018 18:18:24 +0100 Subject: qmake: don't mess up linking order of frameworks make it "last one wins", consistently with regular libraries. this isn't really relevant in qmake, because the order matters only for static frameworks, which qmake defines out of existence. note that specifying frameworks by full path does not work, so we don't need to amend 9d76beee5 in that regard. Change-Id: Ib027109339e1b5973c577d69906b6daf83ba9611 Reviewed-by: Joerg Bornemann --- qmake/generators/unix/unixmake.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 4cbe06d9dc..7f42fbe09e 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -506,17 +506,14 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) if (opt.startsWith("-Xarch")) opt = l.at(++lit); // The user has done the right thing and prefixed each part } - bool found = false; for(int x = 0; x < lflags[arch].size(); ++x) { if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) { - found = true; + lflags[arch].remove(x - 1, 2); break; } } - if(!found) { - lflags[arch].append("-framework"); - lflags[arch].append(opt); - } + lflags[arch].append("-framework"); + lflags[arch].append(opt); } else { lflags[arch].append(opt); } -- cgit v1.2.3 From 8fe36801930872ef4a57e2ff7d7f935de12a33e9 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 1 Feb 2019 15:16:00 +0100 Subject: Add cmdline feature to qmake [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen --- qmake/doc/src/qmake-manual.qdoc | 11 +++++++---- qmake/qmake.pro | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'qmake') diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index fb8bad32a2..84e3fb6df4 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1060,8 +1060,12 @@ proper include paths, compiler flags and libraries will automatically be added to the project. \row \li console \li The target is a Win32 console application (app only). The - proper include paths, compiler flags and libraries will - automatically be added to the project. + proper include paths, compiler flags and libraries will automatically be + added to the project. Consider using the option \c{cmdline} for + cross-platform applications. + \row \li cmdline \li The target is a cross-platform command line application. + On Windows, this implies \c{CONFIG += console}. + On macOS, this implies \c{CONFIG -= app_bundle}. \row \li shared \li{1,2} The target is a shared object/DLL. The proper include paths, compiler flags and libraries will automatically be added to the project. Note that \c dll can also be used on all platforms; @@ -4887,8 +4891,7 @@ \code TEMPLATE = app LANGUAGE = C++ - CONFIG += console precompile_header - CONFIG -= app_bundle + CONFIG += cmdline precompile_header # Use Precompiled headers (PCH) PRECOMPILED_HEADER = stable.h diff --git a/qmake/qmake.pro b/qmake/qmake.pro index ebd61751b7..5399e8c298 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -3,8 +3,8 @@ # and the configures. option(host_build) -CONFIG += console -CONFIG -= qt app_bundle +CONFIG += cmdline +CONFIG -= qt DEFINES += \ PROEVALUATOR_FULL \ -- cgit v1.2.3