2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2012-10-24 12:00:12 +00:00
|
|
|
load(qt_build_paths)
|
|
|
|
|
|
|
|
isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be defined.")
|
|
|
|
|
2011-05-27 08:10:36 +00:00
|
|
|
TEMPLATE = lib
|
2012-10-24 12:00:12 +00:00
|
|
|
CONFIG += plugin
|
|
|
|
DESTDIR = $$MODULE_BASE_OUTDIR/plugins/$$PLUGIN_TYPE
|
2011-05-27 08:10:36 +00:00
|
|
|
|
2014-10-14 13:47:27 +00:00
|
|
|
win32:CONFIG(shared, static|shared) {
|
|
|
|
# Embed a VERSIONINFO resource into the plugin's DLL.
|
|
|
|
isEmpty(VERSION): VERSION = $$QT_VERSION
|
|
|
|
CONFIG += skip_target_version_ext
|
|
|
|
}
|
|
|
|
|
2012-10-24 12:03:47 +00:00
|
|
|
tool_plugin {
|
2016-08-05 11:35:39 +00:00
|
|
|
!build_pass:qtConfig(debug_and_release): CONFIG += release
|
2012-10-24 12:03:47 +00:00
|
|
|
} else:if(win32|mac):!macx-xcode {
|
2016-08-05 11:35:39 +00:00
|
|
|
qtConfig(debug_and_release): CONFIG += debug_and_release
|
|
|
|
qtConfig(build_all): CONFIG += build_all
|
2012-06-12 11:30:13 +00:00
|
|
|
}
|
2011-05-27 08:10:36 +00:00
|
|
|
|
2015-06-05 15:45:47 +00:00
|
|
|
CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
|
|
|
|
|
2014-05-12 13:30:47 +00:00
|
|
|
CONFIG(static, static|shared)|prefix_build {
|
2012-12-07 09:46:43 +00:00
|
|
|
isEmpty(MODULE): MODULE = $$basename(TARGET)
|
2012-10-24 13:02:08 +00:00
|
|
|
|
2014-04-04 14:49:26 +00:00
|
|
|
mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
|
|
|
|
force_independent: \
|
|
|
|
mod_inst_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst
|
|
|
|
else: \
|
|
|
|
mod_inst_pfx = $$mod_work_pfx
|
|
|
|
MODULE_PRI = $$mod_inst_pfx/qt_plugin_$${MODULE}.pri
|
|
|
|
MODULE_FWD_PRI = $$mod_work_pfx/qt_plugin_$${MODULE}.pri
|
2012-10-24 13:02:08 +00:00
|
|
|
|
2012-12-14 09:51:28 +00:00
|
|
|
!build_pass {
|
2016-12-20 19:20:35 +00:00
|
|
|
qt_plugin_deps = $$QT $$QT_PRIVATE
|
|
|
|
qt_plugin_deps = s,-private$,_private,g
|
|
|
|
|
2012-12-14 09:51:28 +00:00
|
|
|
MODULE_PRI_CONT = \
|
|
|
|
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
|
2014-04-16 19:58:20 +00:00
|
|
|
"QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
|
2016-12-20 19:20:35 +00:00
|
|
|
"QT_PLUGIN.$${MODULE}.DEPENDS = $$qt_plugin_deps" \
|
2014-04-02 20:17:40 +00:00
|
|
|
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
|
|
|
|
"QT_PLUGINS += $$MODULE"
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
|
2014-04-04 14:49:26 +00:00
|
|
|
MODULE_PRI_FILES = $$MODULE_PRI
|
|
|
|
|
|
|
|
force_independent {
|
|
|
|
|
|
|
|
# Create a forwarding module .pri file
|
|
|
|
MODULE_FWD_PRI_CONT = \
|
|
|
|
"QT_PLUGIN.$${MODULE}.PATH = $$MODULE_BASE_OUTDIR/plugins" \
|
|
|
|
"include($$MODULE_PRI)"
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
|
2014-04-04 14:49:26 +00:00
|
|
|
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
|
|
|
MODULE_PRI_FILES += $$MODULE_FWD_PRI
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# Then, inject the new module into the current cache state
|
|
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_FWD_PRI): \ # before the actual include()!
|
|
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
|
|
|
|
include($$MODULE_FWD_PRI)
|
|
|
|
for(var, $$list(TYPE EXTENDS CLASS_NAME PATH)): \
|
|
|
|
defined(QT_PLUGIN.$${MODULE}.$$var, var): \
|
|
|
|
cache(QT_PLUGIN.$${MODULE}.$$var, transient)
|
|
|
|
cache(QT_PLUGINS, transient)
|
2012-12-14 09:51:28 +00:00
|
|
|
}
|
2012-10-24 13:02:08 +00:00
|
|
|
|
2014-05-12 13:30:47 +00:00
|
|
|
CONFIG(static, static|shared) {
|
|
|
|
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
|
|
pritarget.files = $$MODULE_PRI
|
|
|
|
INSTALLS += pritarget
|
|
|
|
}
|
2012-10-24 13:02:08 +00:00
|
|
|
}
|
|
|
|
|
2012-10-24 12:00:12 +00:00
|
|
|
target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
|
|
|
INSTALLS += target
|
|
|
|
|
2015-02-25 15:00:58 +00:00
|
|
|
TARGET = $$qt5LibraryTarget($$TARGET)
|
2012-10-24 12:00:12 +00:00
|
|
|
|
2013-08-15 14:45:23 +00:00
|
|
|
CONFIG += create_cmake
|
|
|
|
|
2011-05-27 08:10:36 +00:00
|
|
|
load(qt_targets)
|
2013-01-24 22:54:08 +00:00
|
|
|
load(qt_common)
|
2011-05-27 08:10:36 +00:00
|
|
|
|
2011-12-23 12:47:15 +00:00
|
|
|
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|