qt5base-lts/mkspecs/features/qt_plugin.prf
Miikka Heikkinen 4c5584f0a3 Fix installation of plugin module .pris in static Qt builds
When building Qt static, plugins get module .pri file, but those files
do not get installed in Windows. This is because both .pri generation
and install target statements are scoped with !build_pass, which means
Makefile.Debug and Makefile.Release do not get install_pritarget
target.

Fixed by doing only the .pri generation in !build_pass scope.

Task-number: QTBUG-28606
Change-Id: If3f49b578af1d9171a8bce67793ecb3f902a6da8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-12-17 14:08:17 +01:00

61 lines
1.7 KiB
Plaintext

#
# 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.
#
load(qt_build_paths)
isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be defined.")
TEMPLATE = lib
CONFIG += plugin
DESTDIR = $$MODULE_BASE_OUTDIR/plugins/$$PLUGIN_TYPE
tool_plugin {
!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
} else:if(win32|mac):!macx-xcode {
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
contains(QT_CONFIG, static):CONFIG += static
else:CONFIG += shared
static {
isEmpty(MODULE): MODULE = $$basename(TARGET)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_plugin_$${MODULE}.pri
!build_pass {
MODULE_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
}
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
pritarget.files = $$MODULE_PRI
INSTALLS += pritarget
}
target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
load(qt_targets)
wince*:LIBS += $$QMAKE_LIBS_GUI
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF