diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index f9beabdc18..e7996feb9b 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -50,6 +50,7 @@ INSTALLS += target TARGET = $$qtLibraryTarget($$TARGET) load(qt_targets) +load(qt_common) # plugins.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs # to be regenerated whenever the QML elements exported by the plugin change. This cannot be done diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf new file mode 100644 index 0000000000..203b74f031 --- /dev/null +++ b/mkspecs/features/qt_common.prf @@ -0,0 +1,20 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + +contains(TEMPLATE, .*lib) { + # module and plugins + contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols + unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions + contains(QT_CONFIG, largefile): CONFIG += largefile + 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 +} diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 728d1f5f85..0a34245e3c 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -73,13 +73,6 @@ contains(TARGET, QtAddOn.*): \ else: \ DEFINES += QT_BUILD_$${ucmodule}_LIB -contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols -unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions -contains(QT_CONFIG, largefile):CONFIG += largefile -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 - #mac frameworks mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { #QMAKE_FRAMEWORK_VERSION = 4.0 @@ -168,6 +161,7 @@ win32 { TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end load(qt_targets) +load(qt_common) win32:DEFINES+=_USE_MATH_DEFINES diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 54a995daae..98710431c3 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -23,10 +23,6 @@ tool_plugin { contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release contains(QT_CONFIG, build_all):CONFIG += build_all } -contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols -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 CONFIG(static, static|shared) { isEmpty(MODULE): MODULE = $$basename(TARGET) @@ -52,6 +48,7 @@ INSTALLS += target TARGET = $$qtLibraryTarget($$TARGET) load(qt_targets) +load(qt_common) wince*:LIBS += $$QMAKE_LIBS_GUI QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index b449e4074d..0c6208b2fd 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -28,6 +28,7 @@ host_build { INSTALLS += target load(qt_targets) +load(qt_common) # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build.