qt5base-lts/mkspecs/features/qt_plugin.prf
Oswald Buddenhagen 733ac1f6e6 let static plugins have "module" pri files
... and use them in qt.prf instead of (not) maintaining hand-coded lists.

Change-Id: Ia21f7864eaf3ca92fa75f23876f71075d0521f4b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-01 22:35:28 +01:00

46 lines
1.4 KiB
Plaintext

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
!build_pass:static {
isEmpty(MODULE): MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_plugin_$${MODULE}.pri
MODULE_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE"
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