aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-10-20 16:23:17 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-10-21 15:36:54 +0200
commit795c9831975aa2dca1586ed1b8f4c657ca066651 (patch)
tree34768785c45dd66297accc53afd1dc179bd5f87a
parenta5e1c787f6512013a092f7708c6928b5a9e263c2 (diff)
CMake: Fix no-widgets build
Task-number: QTBUG-86053 Change-Id: Ia2e3c3d0164550bb77b73edb3ef8f5e634e09ea7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/imports/platform/.prev_CMakeLists.txt102
-rw-r--r--src/imports/platform/CMakeLists.txt12
3 files changed, 110 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6dbb0d6..1a2f4203 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,9 +15,8 @@ project(QtQuickControls2
set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
# special case end
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui Widgets Network Qml Quick # special case
- OPTIONAL_COMPONENTS QuickTest # special case
-)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui Network Qml Quick) # special case
+find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Widgets QuickTest) # special case
if(NOT TARGET Qt::Quick)
message(NOTICE "Skipping the build as the condition \"TARGET Qt::Quick\" is not met.")
return()
diff --git a/src/imports/platform/.prev_CMakeLists.txt b/src/imports/platform/.prev_CMakeLists.txt
new file mode 100644
index 00000000..92668739
--- /dev/null
+++ b/src/imports/platform/.prev_CMakeLists.txt
@@ -0,0 +1,102 @@
+# Generated from platform.pro.
+
+#####################################################################
+## qtlabsplatformplugin Plugin:
+#####################################################################
+
+qt_internal_add_qml_module(qtlabsplatformplugin
+ URI "Qt.labs.platform"
+ VERSION "1.1"
+ CLASSNAME QtLabsPlatformPlugin
+ SKIP_TYPE_REGISTRATION
+ SOURCES
+ qquickplatformcolordialog.cpp qquickplatformcolordialog_p.h
+ qquickplatformdialog.cpp qquickplatformdialog_p.h
+ qquickplatformfiledialog.cpp qquickplatformfiledialog_p.h
+ qquickplatformfolderdialog.cpp qquickplatformfolderdialog_p.h
+ qquickplatformfontdialog.cpp qquickplatformfontdialog_p.h
+ qquickplatformicon.cpp qquickplatformicon_p.h
+ qquickplatformiconloader.cpp qquickplatformiconloader_p.h
+ qquickplatformmenu.cpp qquickplatformmenu_p.h
+ qquickplatformmenubar.cpp qquickplatformmenubar_p.h
+ qquickplatformmenuitem.cpp qquickplatformmenuitem_p.h
+ qquickplatformmenuitemgroup.cpp qquickplatformmenuitemgroup_p.h
+ qquickplatformmenuseparator.cpp qquickplatformmenuseparator_p.h
+ qquickplatformmessagedialog.cpp qquickplatformmessagedialog_p.h
+ qquickplatformstandardpaths.cpp qquickplatformstandardpaths_p.h
+ qtlabsplatformplugin.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlPrivate
+ Qt::QuickPrivate
+ Qt::QuickTemplates2Private
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+#### Keys ignored in scope 1:.:.:platform.pro:<TRUE>:
+# IMPORT_VERSION = "1.1"
+# OTHER_FILES = "qmldir"
+# TARGETPATH = "Qt/labs/platform"
+
+## Scopes:
+#####################################################################
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatform_p.h
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_systemtrayicon AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformsystemtrayicon.cpp widgets/qwidgetplatformsystemtrayicon_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND (QT_FEATURE_colordialog OR QT_FEATURE_filedialog OR QT_FEATURE_fontdialog OR QT_FEATURE_messagebox)
+ SOURCES
+ widgets/qwidgetplatformdialog.cpp widgets/qwidgetplatformdialog_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformcolordialog.cpp widgets/qwidgetplatformcolordialog_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_filedialog AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformfiledialog.cpp widgets/qwidgetplatformfiledialog_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_fontdialog AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformfontdialog.cpp widgets/qwidgetplatformfontdialog_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_menu AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformmenu.cpp widgets/qwidgetplatformmenu_p.h
+ widgets/qwidgetplatformmenuitem.cpp widgets/qwidgetplatformmenuitem_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_messagebox AND TARGET Qt::Widgets
+ SOURCES
+ widgets/qwidgetplatformmessagedialog.cpp widgets/qwidgetplatformmessagedialog_p.h
+)
+
+qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_systemtrayicon
+ SOURCES
+ qquickplatformsystemtrayicon.cpp qquickplatformsystemtrayicon_p.h
+)
+qt_internal_add_docs(qtlabsplatformplugin
+ doc/qtlabsplatform.qdocconf
+)
+
diff --git a/src/imports/platform/CMakeLists.txt b/src/imports/platform/CMakeLists.txt
index 92668739..36844102 100644
--- a/src/imports/platform/CMakeLists.txt
+++ b/src/imports/platform/CMakeLists.txt
@@ -56,7 +56,7 @@ qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets
Qt::Widgets
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_systemtrayicon AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_systemtrayicon AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformsystemtrayicon.cpp widgets/qwidgetplatformsystemtrayicon_p.h
)
@@ -66,28 +66,28 @@ qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND
widgets/qwidgetplatformdialog.cpp widgets/qwidgetplatformdialog_p.h
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_colordialog AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformcolordialog.cpp widgets/qwidgetplatformcolordialog_p.h
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_filedialog AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_filedialog AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformfiledialog.cpp widgets/qwidgetplatformfiledialog_p.h
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_fontdialog AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_fontdialog AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformfontdialog.cpp widgets/qwidgetplatformfontdialog_p.h
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_menu AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_menu AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformmenu.cpp widgets/qwidgetplatformmenu_p.h
widgets/qwidgetplatformmenuitem.cpp widgets/qwidgetplatformmenuitem_p.h
)
-qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_messagebox AND TARGET Qt::Widgets
+qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND QT_FEATURE_messagebox AND TARGET Qt::Widgets # special case
SOURCES
widgets/qwidgetplatformmessagedialog.cpp widgets/qwidgetplatformmessagedialog_p.h
)