diff --git a/examples/corelib/time/CMakeLists.txt b/examples/corelib/time/CMakeLists.txt index 148ae5d0148..620c5c32ac7 100644 --- a/examples/corelib/time/CMakeLists.txt +++ b/examples/corelib/time/CMakeLists.txt @@ -1,4 +1,6 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -qt_internal_add_example(calendarbackendplugin) +if(QT_FEATURE_widgets) + qt_internal_add_example(calendarbackendplugin) +endif() diff --git a/examples/corelib/time/time.pro b/examples/corelib/time/time.pro index 4d24416e345..bae84a35142 100644 --- a/examples/corelib/time/time.pro +++ b/examples/corelib/time/time.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs CONFIG += no_docs_target -SUBDIRS = calendarbackendplugin +qtHaveModule(widgets): SUBDIRS = calendarbackendplugin