aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-11-03 17:06:36 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-11-12 18:06:39 +0100
commit89f9ddc93fd8b2f6d2ca36f045d5a09a4813fb6c (patch)
tree2190983eca791c2b75d388811b5d9b462fc3b3ff
parent8cdbcee614dbb34d4ac770bee1734c18ea27fa12 (diff)
CMake: Change Quick.Window into a pure Qml module
This fixes apps using Qt.Window with static Qt builds when deployed to a machine that doesn't have Qt installed. This will need a counterpart fix in qmake land. Change-Id: Ife11f9d1f1826e1188ef3dc3933af2f243860b6f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/imports/.prev_CMakeLists.txt39
-rw-r--r--src/imports/CMakeLists.txt3
-rw-r--r--src/imports/window/CMakeLists.txt11
-rw-r--r--src/quick/CMakeLists.txt7
4 files changed, 53 insertions, 7 deletions
diff --git a/src/imports/.prev_CMakeLists.txt b/src/imports/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..468d7fc639
--- /dev/null
+++ b/src/imports/.prev_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from imports.pro.
+
+add_subdirectory(builtins)
+add_subdirectory(qtqml)
+add_subdirectory(models)
+add_subdirectory(labsmodels)
+add_subdirectory(tooling)
+if(QT_FEATURE_qml_itemmodel)
+ add_subdirectory(folderlistmodel)
+endif()
+if(QT_FEATURE_qml_worker_script)
+ add_subdirectory(workerscript)
+endif()
+if(TARGET Qt::Sql)
+ add_subdirectory(localstorage)
+endif()
+if(QT_FEATURE_settings)
+ add_subdirectory(settings)
+endif()
+if(TARGET Qt::Quick)
+ add_subdirectory(labsanimation)
+ add_subdirectory(layouts)
+ add_subdirectory(qtquick2)
+endif()
+if(QT_FEATURE_quick_shadereffect AND TARGET Qt::Quick)
+ add_subdirectory(wavefrontmesh)
+endif()
+if(TARGET Qt::Quick AND TARGET Qt::Test)
+ add_subdirectory(testlib)
+endif()
+if(QT_FEATURE_systemsemaphore AND TARGET Qt::Quick)
+ add_subdirectory(sharedimage)
+endif()
+if(QT_FEATURE_quick_particles AND TARGET Qt::Quick)
+ add_subdirectory(particles)
+endif()
+if(QT_FEATURE_quick_path AND TARGET Qt::Quick)
+ add_subdirectory(shapes)
+endif()
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
index d2c8e5694f..9df5367295 100644
--- a/src/imports/CMakeLists.txt
+++ b/src/imports/CMakeLists.txt
@@ -36,3 +36,6 @@ endif()
if(QT_FEATURE_quick_path AND TARGET Qt::Quick)
add_subdirectory(shapes)
endif()
+# special case begin
+add_subdirectory(window)
+# special case end
diff --git a/src/imports/window/CMakeLists.txt b/src/imports/window/CMakeLists.txt
new file mode 100644
index 0000000000..1f02b1a380
--- /dev/null
+++ b/src/imports/window/CMakeLists.txt
@@ -0,0 +1,11 @@
+# special case skip regeneration
+
+qt_internal_add_qml_module(quickwindow
+ URI "QtQuick.Window"
+ VERSION "${CMAKE_PROJECT_VERSION}"
+ IMPORTS
+ QtQuick/auto
+ PAST_MAJOR_VERSIONS 2
+ GENERATE_QMLTYPES
+ INSTALL_QMLTYPES
+)
diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt
index 5be34f3295..e9e456c949 100644
--- a/src/quick/CMakeLists.txt
+++ b/src/quick/CMakeLists.txt
@@ -525,10 +525,3 @@ set_target_properties(Quick PROPERTIES
qt6_qml_type_registration(Quick)
-#special case begin
-if (QT_WILL_INSTALL)
- install(FILES ../imports/window/qmldir DESTINATION "${INSTALL_QMLDIR}/QtQuick/Window")
-else()
- file(COPY ../imports/window/qmldir DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/QtQuick/Window")
-endif()
-#special case end