From 89f9ddc93fd8b2f6d2ca36f045d5a09a4813fb6c Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 3 Nov 2020 17:06:36 +0100 Subject: 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 Reviewed-by: Qt CI Bot --- src/imports/.prev_CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ src/imports/CMakeLists.txt | 3 +++ src/imports/window/CMakeLists.txt | 11 +++++++++++ src/quick/CMakeLists.txt | 7 ------- 4 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 src/imports/.prev_CMakeLists.txt create mode 100644 src/imports/window/CMakeLists.txt (limited to 'src') 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 -- cgit v1.2.3