Qt Declarative (Quick 2)
Go to file
Alexandru Croitor 828cbe57a1 CMake: Fix warning about ShaderTools not being found when building examples
When building examples in-tree in a prefix build, we set QT_NO_CREATE_TARGETS
to TRUE and that causes find_package(QtFoo) calls in example projects
not to define targets.

If the targets were not found previously as part of the find_package calls
in qtdeclarative/CMakeLists.txt, this generates warnings like

 CMake Warning at lib/cmake/Qt6/Qt6Config.cmake:176 (find_package):
   Found package configuration file:
     lib/cmake/Qt6ShaderTools/Qt6ShaderToolsConfig.cmake
   but it set Qt6ShaderTools_FOUND to FALSE so package "Qt6ShaderTools" is
   considered to be NOT FOUND.  Reason given by package:
   Target "Qt6::ShaderTools" was not found.  Possibly due to
   QT_NO_CREATE_TARGETS being set to TRUE and thus
    lib/cmake/Qt6ShaderTools/Qt6ShaderToolsTargets.cmake
   was not included to define the target.

To avoid the warnings, search for the target ShaderTools package as an
optional component.

Amends 0d517b553b

Pick-to: 6.2
Fixes: QTBUG-96358
Change-Id: I50c2f1516ca26c099559001e74b7e25c625be6e6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-09-28 08:14:21 +02:00
cmake Fix missing 'We mean it' warning for generated qml_compile_hash_p.h 2021-03-31 17:06:00 +02:00
coin CMake: Enable enforcing CI tests 2020-07-13 18:01:41 +02:00
dist Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
examples Use strict === equality for ScrollBar::orientation 2021-09-27 16:30:02 +03:00
features Add the skeleton for a D3D12 backend 2016-02-19 14:51:37 +00:00
src Fix documentation on JavaScript imports 2021-09-27 22:32:46 +02:00
tests tst_grabImage: Fix the cases were visually comparing invisible items 2021-09-25 11:36:27 +03:00
tools qml: Deprecate the --dummy-data option 2021-09-24 11:32:23 +02:00
.cmake.conf Bump version 2021-09-14 08:16:35 +03:00
.gitattributes Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
.gitignore Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
.gitmodules Update to the latest version of the ecmascript test suite 2018-04-26 20:26:36 +00:00
.tag Import the Qt Quick Controls 2 prototype 2015-02-05 14:50:29 +02:00
CMakeLists.txt CMake: Fix warning about ShaderTools not being found when building examples 2021-09-28 08:14:21 +02:00
LICENSE.FDL Add LICENSE.FDL for docs 2015-03-18 16:26:12 +02:00
LICENSE.GPL2 Fix license headers 2017-12-22 08:05:01 +00:00
LICENSE.GPL3 Fix license headers 2017-12-22 08:05:01 +00:00
LICENSE.GPL3-EXCEPT Updated license headers 2016-01-20 11:46:25 +00:00
LICENSE.GPLv3 Fix licensing 2017-05-04 04:30:21 +00:00
LICENSE.LGPL3 Fix license headers 2017-12-22 08:05:01 +00:00
LICENSE.LGPLv3 Fix licensing 2017-05-04 04:30:21 +00:00
README.md Rewrite README.md 2021-08-12 13:15:17 +00:00
conanfile.py Conan: Inherit recipe class from QtLeafModule for common functionality 2021-08-26 10:04:21 +03:00
configure.cmake CMake: Add missing qt_cmdline.cmake files 2021-04-16 11:03:59 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2021-09-27 17:48:17 +00:00
qt_cmdline.cmake Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
qtdeclarative.doxy Add doxyfile for building doxygen documentation 2018-08-16 15:54:40 +00:00
sync.profile Consolidate test helpers into private libraries 2021-09-13 21:17:04 +02:00