aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlBuildInternals.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Allow building pure QML modules not backed by C++ sourcesAlexandru Croitor2020-11-121-16/+18
| | | | | | | | | | | | | | | | When no C++ sources are passed to qt_internal_add_qml_plugin (a pure QML module), create a C++ backed Qt plugin anyway. In such a case, generate a dummy plugin.cpp containing a QQmlEngineExtensionPlugin subclass. The class name is autogenerated from the QML import URI. The class constructor will call the qmltyperegistrar generated void qml_register_types_foo() function, to ensure the needed module versions are registered for the QML module. Change-Id: I19959dafdf0dc837c6037e7dc1d549b7420110a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Add past-major-version optionMaximilian Goldstein2020-11-101-0/+2
| | | | | | | | Adds the option to specify past major versions of modules to be registered. This is necessary for modules that don't export any types themselves to work when built statically. Change-Id: I4b4a379f92707ec64cbb32f91db9d010440b95a2 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* CMake: Clean up logic to prepare building pure QML modulesUlf Hermann2020-11-061-2/+12
| | | | | | | | | | | | | | Make sure we don't create bogus typeinfo entries, do create a target if there are no C++ files, and do install created targets. This way we do build the qmlcachegen-created files and link them into a library which is subsequently deployed. It's not a real plugin, though, and we need to specially handle this in QML. That's material for a separate change. Change-Id: I516d4611b6041a23489ce57df38dd83114dcc5de Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Use qt_internal_add_plugin in qt_internal_add_qml_moduleAlexandru Croitor2020-10-131-1/+1
| | | | | | | | | The implementation means to call qt_internal_add_plugin because that's the one that handles the 'QML_TARGET_PATH' option. Task-number: QTBUG-86827 Change-Id: I3289741458cb8038f576bc4b08617f42fce98710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow optional imports in qmldir filesUlf Hermann2020-10-081-0/+2
| | | | | | | | | | This is useful for modules that select their imports at runtime using qmlRegisterModuleImport(). We can list all possible variants as optional imports so that tools can see what types might be available. Task-number: QTBUG-87130 Change-Id: I8a37bdde79aef3619fd1f05e5ea6781d521afa88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Allow installation of qmltypes filesUlf Hermann2020-10-081-0/+6
| | | | | | | | This is what qmake does on install_qmltypes and we do want to install the qmltypes files of our own modules. Change-Id: Iad430aab87f21331abf332ca5c92f9d7edc47bb0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename internal functions to contain qt_internalAlexandru Croitor2020-09-251-4/+10
| | | | | | | | | Offer compatibility wrapper functions until we update all of the Qt repos to use the new names. Task-number: QTBUG-86815 Change-Id: I834ac1d5d6549bd4e33b9916a2198a7a03c0d183 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow QML plugins to be optionalUlf Hermann2020-06-091-0/+7
| | | | | | | | | | | If a plugin does nothing but load the library that provides the types, we can skip the plugin loading by linking the library directly. State that in the qmldir file, and evaluate it when loading the module. Task-number: QTBUG-84639 Change-Id: I2097237866a50f66c55e4653ad119fe10e18a893 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QML_PLUGINDUMP_DEPENDENCIESUlf Hermann2020-05-191-3/+0
| | | | | | | It isn't used anywhere and it really shouldn't be used. Change-Id: Ia101afde63b2c651ae36d719f0ba96428f12ecc9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix typoUlf Hermann2020-05-191-1/+1
| | | | | | | The 's' is important. Change-Id: Ib3a5ed86aae8f5807902193e1051e361214ef20a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Qt6QmlBuildInternals.cmake and qt_add_qml_module()Leander Beernaert2020-02-061-0/+174
Add the qt_add_qml_module() which was originally present in QtBuild.cmake in QtBase. Change-Id: If053c0581dd14a6dcf4ef2013c9266e7dd828a76 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>