diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt index 8ab3ef3360..1e7adc5d66 100644 --- a/examples/quick/CMakeLists.txt +++ b/examples/quick/CMakeLists.txt @@ -40,7 +40,9 @@ if(TARGET Qt6::QuickWidgets AND TARGET Qt6::Widgets AND (QT_FEATURE_opengl OR QT endif() add_subdirectory(quickshapes) qt_internal_add_example(advancedtext) -qt_internal_add_example(vectorimage) +if(TARGET Qt6::Svg) + qt_internal_add_example(vectorimage) +endif() # qt_examples_build_end() misses at least some of these due to some # source subdirectories being added multiple times. See QTBUG-96159. diff --git a/examples/quick/quickshapes/CMakeLists.txt b/examples/quick/quickshapes/CMakeLists.txt index e739c3dc89..c65bee6799 100644 --- a/examples/quick/quickshapes/CMakeLists.txt +++ b/examples/quick/quickshapes/CMakeLists.txt @@ -1,12 +1,16 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -qt_internal_add_example(shapes) -qt_internal_add_example(weatherforecast) - # qt_examples_build_end() misses at least some of these due to some # source subdirectories being added multiple times. See QTBUG-96159. -set(reused_dir_targets shapes_shared weatherforecast_shared) +set(reused_dir_targets shapes_shared) + +qt_internal_add_example(shapes) + +if(TARGET Qt6::Svg) + list(APPEND reused_dir_targets weatherforecast_shared) + qt_internal_add_example(weatherforecast) +endif() foreach(target IN LISTS reused_dir_targets) if(TARGET ${target})