summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Vuolle <[email protected]>2025-04-28 12:42:02 +0300
committerJuha Vuolle <[email protected]>2025-04-29 17:00:12 +0300
commit5776865f7c6b234f66512eab41c871662449d80d (patch)
tree89da569893bb4615de852e383266a16bd30414d9
parent3bbe9d8ec7ab49a44b1ba661b0930d5d3506bce6 (diff)
Compile calendarbackendplugin only if widgets are enabled
The example links against widgets unconditionally => add proper build-time guard Task-number: QTBUG-136101 Pick-to: 6.9 Change-Id: I62ea42a04f7ff421753a0fc7a30cd969cfaff6e2 Reviewed-by: Magdalena Stojek <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
-rw-r--r--examples/corelib/time/CMakeLists.txt4
-rw-r--r--examples/corelib/time/time.pro2
2 files changed, 4 insertions, 2 deletions
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