aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-06-10 18:55:28 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-06-25 12:06:02 +0200
commit1a78a6df1dd0c7139ab77231dbffbd6dd49992dd (patch)
tree07197874a721a4083da244cfe527d4d8c36373c2 /src/qml/CMakeLists.txt
parent5345349d5de897dac3dbf25e3e17a00c6545ac81 (diff)
CMake: Use object library initializers for qml plugins
Just like we do for regular plugins, pre-build Q_IMPORT_PLUGIN object libraries for qml plugins, which will then be linked by qt_import_qml_plugins (instead of generating and compiling a unity source file). This is done both for Qt qml plugins and user-created qml plugins. The advantage of this approach is that user project build time will be faster due to not having to generate and compile the Q_IMPORT_PLUGIN calls. Another advantage is that the plugin initializers will propagate across static libraries to the final executable or shared library, even if any intermediate static libraries are linked privately. This is achieved by using __qt_internal_propagate_object_library from qtbase and is subject to the CMake version used as well as the capabilities of the linker to handle link cycles. Remove code path that generates and compiles Q_IMPORT_PLUGIN calls at qt_import_qml_plugins time. There shouldn't be cases where this is necessary because all plugins built with qt_add_qml_plugin will have a plugin initializer object library. This reduces implementation complexity and issues with propagating the initializers across multiple static libraries. Pick-to: 6.2 Task-number: QTBUG-92933 Task-number: QTBUG-93257 Task-number: QTBUG-94605 Change-Id: I0a04f904d6b3089b04f9e6e206143f7a205653bf Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/qml/CMakeLists.txt')
-rw-r--r--src/qml/CMakeLists.txt1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt
index 7cabb9dcf9..8b9a4643c5 100644
--- a/src/qml/CMakeLists.txt
+++ b/src/qml/CMakeLists.txt
@@ -378,7 +378,6 @@ qt_internal_add_qml_module(Qml
Qt::CorePrivate
EXTRA_CMAKE_FILES
"${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}qmldirTemplate.cmake.in"
- "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmlImportScannerTemplate.cpp.in"
"${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}QmlPluginTemplate.cpp.in"
)