diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-11-24 10:31:00 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-11-25 13:28:46 +0100 |
commit | fb85ccfb31215bf31b0e31ab3c5594eee11a147d (patch) | |
tree | 190a277584e7f770f7c1b1c030133c0511a47e58 | |
parent | 980e2f2a3f40521ce68e1f563c731b18984e64c8 (diff) |
CMake: Fix build without qtshadertools
The find_package(... ShaderTools) call was moved to the top-level
CMakeLists.txt in a previous commit. Also, the package was made
optional. The qtshadertools dependency in dependencies.yaml is also
marked as optional.
Make the qt3d-rhi-renderer feature dependent on the availability of the
Qt::ShaderTools target.
Change-Id: I4849428d1ff4405b7547d56251c3c81bfa2e6a5b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/plugins/renderers/rhi/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/render/configure.cmake | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/renderers/rhi/CMakeLists.txt b/src/plugins/renderers/rhi/CMakeLists.txt index 9cb14d40a..4e7febe57 100644 --- a/src/plugins/renderers/rhi/CMakeLists.txt +++ b/src/plugins/renderers/rhi/CMakeLists.txt @@ -23,8 +23,6 @@ set(rhiRendererSources graphicshelpers/submissioncontext.cpp graphicshelpers/sub textures/texture.cpp textures/texture_p.h ) -find_package(Qt6 REQUIRED COMPONENTS ShaderTools) - ##################################################################### ## Static library used for Unit Tests: ##################################################################### diff --git a/src/render/configure.cmake b/src/render/configure.cmake index a7932f758..9732aca87 100644 --- a/src/render/configure.cmake +++ b/src/render/configure.cmake @@ -28,6 +28,7 @@ qt_feature("qt3d-rhi-renderer" PUBLIC SECTION "Qt 3D Renderers" LABEL "RHI Renderer" PURPOSE "Use the RHI renderer (requires qtShaderTools module)" + CONDITION TARGET Qt::ShaderTools ) qt_feature("qt3d-vulkan" PUBLIC LABEL "Vulkan" |