diff options
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/default_post.prf | 5 | ||||
-rw-r--r-- | mkspecs/features/qt.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qt_module_config.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qt_plugin.prf | 3 |
4 files changed, 34 insertions, 14 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index c56729a70d..349faba976 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -2,6 +2,11 @@ contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target !have_target:!force_qt: CONFIG -= qt +!shared:!dll:!static:!staticlib { + contains(QT_CONFIG, static): CONFIG += static + else: CONFIG += shared +} + QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) !isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ... !staticlib:!static:CONFIG(release, debug|release):have_target: \ # is it applicable? diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 8af10b143d..03e58b3afd 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -2,15 +2,19 @@ CONFIG *= thread #handle defines win32 { - qt_static:DEFINES += QT_NODLL - !contains(DEFINES, QT_NODLL) { - QT_ENV_DLL = $$(QT_DLL) - QT_ENV_NO_DLL = $$(QT_NODLL) - isEmpty(QT_ENV_NO_DLL) { - shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL - } - contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1 + # ### QT_NODLL and QT_DLL are compatibility, remove before the Qt 5.0 release + contains(QT_CONFIG, shared) { + DEFINES += QT_DLL + + # this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp + # function VcprojGenerator::initDeploymentTool(), which contains some hardcoded + # library names (the ones that were static in Qt 4) + # it probably doesn't work anymore and should not be in this file + QMAKE_QT_DLL = 1 + } else { + DEFINES += QT_NODLL } + # Some files include qplatformdefs.h, which lives in the individual mkspec directory # However, if QMAKESPEC_ORIGINAL is set, the module/app is outside of the QtBase # directory, and using the default profile. So we add the original mkspecs directory diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index 65c54f7a21..2046fc5eda 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -12,6 +12,16 @@ isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0) isEmpty(TARGET):error("You must set TARGET before include()'ing $${_FILE_}") isEmpty(VERSION):VERSION = $$QT_VERSION +# Compile as shared/DLL or static according to the option given to configure +# unless overridden +staticlib: CONFIG += static +!static:!shared { + contains(QT_CONFIG, static): \ + CONFIG += static + else: \ + CONFIG += shared +} + ucmodule = $$upper($$MODULE) MODULE_DEPENDS = $$replace(QT, -private$, ) @@ -48,9 +58,9 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_$${MODULE}.pri } else { module_privdep = } - staticlib: \ + static: \ module_build_type = "QT.$${MODULE}.module_config = staticlib" - else:mac:!static:contains(QT_CONFIG, qt_framework): \ + else:mac:contains(QT_CONFIG, qt_framework): \ module_build_type = "QT.$${MODULE}.module_config = lib_bundle" else: \ module_build_type = @@ -157,8 +167,6 @@ mac { } } -win32:!shared:CONFIG += static - win32-borland { # Keep the size of the .tds file for the Qt library smaller than # 34 Mbytes to avoid linking problems @@ -166,8 +174,10 @@ win32-borland { QMAKE_CXXFLAGS_DEBUG += -vi -y- } +DEFINES += QT_BUILDING_QT win32 { INCLUDEPATH += tmp + # ### QT_MAKEDLL is compatibility, remove before the Qt 5.0 release !static: DEFINES+=QT_MAKEDLL } win32-borland:INCLUDEPATH += kernel @@ -177,8 +187,6 @@ aix-g++* { QMAKE_CXXFLAGS += -mminimal-toc } -!static:PRL_EXPORT_DEFINES += QT_SHARED - #install directives load(qt_installs) diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index d2826822c3..5c29b1d16b 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -12,6 +12,9 @@ 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 + load(qt_targets) wince*:LIBS += $$QMAKE_LIBS_GUI |