diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-02 16:44:55 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-21 19:45:44 +0100 |
commit | 8f7080fd0957fea3a67a255e5344ab125fa3c33f (patch) | |
tree | 4569ad2e2e1089212de2090c71ba4a52ef2e9522 /examples/qml | |
parent | ba092a525d01ee028bea6da271ea4baf64a62095 (diff) |
Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, tests
Every instance of AUTO_RESOURCE_PREFIX has been replaced by either
qt_standard_project_setup(REQUIRES 6.5) or with
qt_policy(SET QTP0001 NEW), mainly in tests.
In addition, I added a warning message for the case where
AUTO_RESOURCE_PREFIX is used.
Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I323a15e9d0bb5fe6ba649365314af9fc2ad67bda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'examples/qml')
-rw-r--r-- | examples/qml/dynamicscene/CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/qml/qmlextensionplugins/CMakeLists.txt | 3 | ||||
-rw-r--r-- | examples/qml/xmlhttprequest/CMakeLists.txt | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/examples/qml/dynamicscene/CMakeLists.txt b/examples/qml/dynamicscene/CMakeLists.txt index b91ed5aca7..2999324307 100644 --- a/examples/qml/dynamicscene/CMakeLists.txt +++ b/examples/qml/dynamicscene/CMakeLists.txt @@ -15,6 +15,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qml/dynamicscene") find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick) +qt_standard_project_setup(REQUIRES 6.5) + qt_add_executable(dynamicsceneexample WIN32 MACOSX_BUNDLE main.cpp) target_link_libraries(dynamicsceneexample PUBLIC @@ -26,7 +28,6 @@ target_link_libraries(dynamicsceneexample PUBLIC qt_add_qml_module(dynamicsceneexample URI dynamicscene - AUTO_RESOURCE_PREFIX QML_FILES "GenericSceneItem.qml" "PaletteItem.qml" diff --git a/examples/qml/qmlextensionplugins/CMakeLists.txt b/examples/qml/qmlextensionplugins/CMakeLists.txt index 753f05b173..0a16d6c843 100644 --- a/examples/qml/qmlextensionplugins/CMakeLists.txt +++ b/examples/qml/qmlextensionplugins/CMakeLists.txt @@ -14,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qml/qmlextensionplugins/imports/T find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml) +qt_standard_project_setup(REQUIRES 6.5) + #![0] set(qml_files imports/TimeExample/Clock.qml @@ -37,7 +39,6 @@ qt_add_qml_module(qmlqtimeexample OUTPUT_DIRECTORY imports/TimeExample URI "TimeExample" SOURCES timemodel.cpp timemodel.h - AUTO_RESOURCE_PREFIX QML_FILES ${qml_files} RESOURCES ${images} ) diff --git a/examples/qml/xmlhttprequest/CMakeLists.txt b/examples/qml/xmlhttprequest/CMakeLists.txt index 63d15c37dd..8c36cf54d4 100644 --- a/examples/qml/xmlhttprequest/CMakeLists.txt +++ b/examples/qml/xmlhttprequest/CMakeLists.txt @@ -14,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qml/xmlhttprequest") find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick) +qt_standard_project_setup(REQUIRES 6.5) + qt_add_executable(xmlhttprequestexample WIN32 MACOSX_BUNDLE @@ -22,7 +24,6 @@ qt_add_executable(xmlhttprequestexample qt_add_qml_module(xmlhttprequestexample URI xmlhttprequest - AUTO_RESOURCE_PREFIX QML_FILES "methods.js" "xmlhttprequest.qml" |