add QT_CONFIG's static/shared to CONFIG on startup

... instead of as a fallback in default_post.
it was this way in qt4, and it requires less code to be written in the
end. we are already doing it for debug/release as well.

Change-Id: I6e02849d61d14a18375cf64a5990768931ebac48
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-02-15 19:28:28 +01:00 committed by The Qt Project
parent 2e4ce301f9
commit 489d8a0627
6 changed files with 6 additions and 17 deletions

2
configure vendored
View File

@ -5330,9 +5330,11 @@ fi
if [ "$CFG_SHARED" = "yes" ]; then
QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
elif [ "$CFG_SHARED" = "no" ]; then
QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
QT_CONFIG="$QT_CONFIG static"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG static"
fi
#FIXME: qpa is implicit this should all be removed

View File

@ -10,7 +10,7 @@ defineReplace(qtPlatformTargetSuffix) {
defineReplace(qtLibraryTarget) {
LIBRARY_NAME = $$1
mac:!static:contains(QT_CONFIG, qt_framework) {
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
} else {

View File

@ -25,12 +25,6 @@ isEmpty(VERSION):VERSION = $$QT_VERSION
# Compile as shared/DLL or static according to the option given to configure
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
!static:!shared {
contains(QT_CONFIG, static): \
CONFIG += static
else: \
CONFIG += shared
}
ucmodule = $$upper($$MODULE)
@ -87,7 +81,7 @@ contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_no
contains(QT_CONFIG, c++11):CONFIG += c++11
#mac frameworks
mac:!static:contains(QT_CONFIG, qt_framework) {
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
#QMAKE_FRAMEWORK_VERSION = 4.0
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
CONFIG(release, debug|release) {

View File

@ -28,10 +28,7 @@ contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
contains(QT_CONFIG, c++11):CONFIG += c++11
contains(QT_CONFIG, static):CONFIG += static
else:CONFIG += shared
static {
CONFIG(static, static|shared) {
isEmpty(MODULE): MODULE = $$basename(TARGET)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_plugin_$${MODULE}.pri

View File

@ -14,11 +14,6 @@ staticlib: \
else: dll: \
CONFIG += shared
!shared:!static {
contains(QT_CONFIG, static): CONFIG += static
else: CONFIG += shared
}
CONFIG(static, static|shared) {
CONFIG -= shared dll
contains(TEMPLATE, ".*lib"): CONFIG += staticlib

View File

@ -3029,6 +3029,7 @@ void Configure::generateQConfigPri()
configStream << "CONFIG+= ";
configStream << dictionary[ "BUILD" ];
configStream << (dictionary[ "SHARED" ] == "no" ? " static" : " shared");
if (dictionary[ "LTCG" ] == "yes")
configStream << " ltcg";