aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shapes/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Improve examples CMakeLists.txtKai Köhne2022-01-241-11/+6
| | | | | | | | | | | | | | | | | | - Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: I0d6bfb06c4b25e9921d3d2bf31d977150f12b31b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix wrongly copy-pasted dependency in exampleAlexandru Croitor2021-10-011-1/+1
| | | | | | | | | Amends edc4357ae4893dd952ce1c07b180b4b334047606 Pick-to: 6.2 Task-number: QTBUG-96805 Change-Id: Iedbf372cd94b1b04db55685a5d05daca491200fe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix examples that use 'shared' project when using a static QtAlexandru Croitor2021-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a static Qt, linking of examples that use the 'shared' Qml module would fail with the following error Undefined symbols for architecture x86_64: "qt_static_plugin_sharedPlugin()", referenced from: StaticsharedPluginPluginInstance::StaticsharedPluginPluginInstance() in window_shared_init.cpp.o This happened because the 'shared' project pre-created its plugin target with qt_add_library instead of qt_add_plugin. qt_add_plugin passes an additional QT_STATICPLUGIN compile definition when compiling the moc'ed file to ensure that the QT_MOC_EXPORT_PLUGIN macro creates a qt_plugin_instance_PLUGIN_NAME symbol. Unfortunately we can't use qt_add_plugin for shared Qt builds, because some of the projects link directly against the plugin target and it's not possible to link against a MODULE_LIBRARY target which qt_add_plugin creates in shared Qt build. We could try to conditionally switch between using qt_add_library for a shared Qt build and qt_add_plugin for a static Qt build, but that further complicates the build system code because it requires specifying a class name and plugin type explicitly. Remove the direct linkage against the libraries in the examples and instead rely on plugin loading. This simplifies the logic of not having to pre-create a target. Amends 7b6eea37aeea55cdf1bcb1fd9c3091d6753f95e8 Pick-to: 6.2 Fixes: QTBUG-96805 Change-Id: I5b2f3992ccda29b59f1e99748005381c73daca69 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Install the "shared" example module into macOS bundlesUlf Hermann2021-09-031-0/+1
| | | | | | | | | | | | | | | If we build an application bundle we cannot rely on the relative path between the application's and the shared module's output directories. This is somewhat ugly, but as we don't have a comprehensive solution for building application bundles, yet, it's the best we can do right now. In order for the shared bundle to be loaded from the PlugIns directory, we need to add the PlugIns directory to the import path on macOS. Pick-to: 6.2 Change-Id: I5b952420b4bb60af74886a140fa2c6a263d2f730 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Rename shapes example qml files according to what they demonstrateShawn Rutledge2021-09-011-16/+16
| | | | | | | | | | | | The order they are shown in the grid is not important; but users should be able to run any of these qml files directly without building the example, and appropriate names make the "right one" easier to find. Task-number: QTBUG-95739 Pick-to: 6.2 Change-Id: I9751b52ce80bc08e12919ca3396c9d428d700a04 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up shapes exampleUlf Hermann2021-09-011-130/+34
| | | | | | | | | | | | Drop the confusing alias mangling on all the QML files. Instead move them into the base "shapes" directory. Also, use a QML module in CMake and use the "shared" module as intended. Pick-to: 6.2 Change-Id: I6a8fc3f2b2f86f58a54e188cf83ec7e2d4e8f468 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-171-1/+1
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I9f76b787533dad1c469fbb8c69df6c27b20a9aa3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-261-0/+4
| | | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: I46769fb543acb2cbeba122470b5e44ad478fbe4e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor2020-10-201-1/+1
| | | | | | Task-number: QTBUG-87661 Change-Id: Ie5bba408000211b24694aa0143bdf79c4a298f42 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* CMake: Regenerate qtdeclarative/examplesAlexandru Croitor2020-05-291-1/+5
| | | | | | | | | Includes - new example installation paths - one case of QT_QMLTYPES_FILENAME addition Change-Id: I24423da9b04b6ecc8445017fa35f148dd43b1829 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Post-merge fixesAlexandru Croitor2020-01-301-0/+4
| | | | | Change-Id: I2350df5368ee34d6c7072d456806e518ce533839 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate ExamplesLeander Beernaert2019-10-141-2/+2
| | | | | Change-Id: I2fbfb44bbb6d667e022bffb480feaf74ff0d0a5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update Examples with lowercase qt6_add_resources()Leander Beernaert2019-09-201-1/+1
| | | | | | | | Re-run pro2cmake on all exampls. Change-Id: Iafd1092beff023b407a8f29c2a5b651f2e534b75 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert ExamplesLeander Beernaert2019-08-231-0/+157
This patch converts all examples in qtdeclarative except for a few exceptions which require a public facing qml plugin api. Change-Id: I2cd2b1bb455be8b48796893a8235dea7f8b35aa2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>