79fda7a549
In Qt5, the -qtlibinfix option did not affect the naming of plugins,
unless -qtlibinfix-plugins was set. This option was added in
5641650993
to offer a way to have -qtlibinfix affect the plugin names
without changing the default behavior. We now remove the
-qtlibinfix-plugins option, as the old behavior is not desirable.
[ChangeLog][configure] The -qtlibinfix option now affects the names of
plugins. The -qtlibinfix-plugins configure option was removed.
Task-number: QTBUG-15192
Fixes: QTBUG-85439
Change-Id: I96f5c2577b76274929c431621967df0e9b4631b7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
104 lines
3.3 KiB
Plaintext
104 lines
3.3 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
|
|
|
|
win32:CONFIG(shared, static|shared) {
|
|
# Embed a VERSIONINFO resource into the plugin's DLL.
|
|
isEmpty(VERSION): VERSION = $$QT_VERSION
|
|
CONFIG += skip_target_version_ext
|
|
}
|
|
|
|
tool_plugin {
|
|
!build_pass:qtConfig(debug_and_release): CONFIG += release
|
|
} else:if(win32|mac):!macx-xcode {
|
|
qtConfig(debug_and_release): CONFIG += debug_and_release
|
|
qtConfig(build_all): CONFIG += build_all
|
|
}
|
|
|
|
CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
|
|
|
|
# Qt libraries should only use Application Extension safe APIs
|
|
darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only
|
|
|
|
isEmpty(MODULE): MODULE = $$basename(TARGET)
|
|
|
|
CONFIG(static, static|shared)|prefix_build {
|
|
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
|
|
|
|
!build_pass {
|
|
qt_plugin_deps = $$QT $$QT_PRIVATE
|
|
qt_plugin_deps ~= s,-private$,_private,g
|
|
|
|
MODULE_PRI_CONT = \
|
|
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
|
|
"QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
|
|
"QT_PLUGIN.$${MODULE}.DEPENDS = $$qt_plugin_deps" \
|
|
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
|
|
"QT_PLUGINS += $$MODULE"
|
|
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
|
|
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)"
|
|
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
|
|
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)
|
|
}
|
|
|
|
CONFIG(static, static|shared) {
|
|
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
pritarget.files = $$MODULE_PRI
|
|
INSTALLS += pritarget
|
|
}
|
|
}
|
|
|
|
target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
|
INSTALLS += target
|
|
|
|
TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX, "plugins/$$PLUGIN_TYPE/")
|
|
|
|
CONFIG += create_cmake
|
|
|
|
DEFINES *= QT_DEPRECATED_WARNINGS
|
|
|
|
load(qt_targets)
|
|
load(qt_common)
|
|
|
|
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|