summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-06-08 17:20:21 +0200
committerLars Knoll <lars.knoll@qt.io>2021-06-09 10:06:35 +0200
commit23e8bd463ea2a92b809af2c30e79097f0982c093 (patch)
tree5e8cfd505d8a26fa06860ac82e0b2579ea5c34c0
parentfb92cfebbc3ab088c92f773d8293083f41d2aff7 (diff)
CMake: Use fixed qt_add_resource BASE argument
Task-number: QTBUG-86726 Change-Id: I5e96d2329ef048b31e182122b9cd86b6aa6ceaeb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--CMakeLists.txt3
-rw-r--r--examples/multimedia/video/qmlvideo/CMakeLists.txt10
-rw-r--r--examples/multimedia/video/qmlvideofx/CMakeLists.txt10
3 files changed, 7 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec2731d6b..1a8538b1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,9 @@ project(QtMultimedia
# Make sure we only use latest private CMake API, aka no compatibility wrappers.
set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
+# Make sure we use the fixed BASE argument of qt_add_resource.
+set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE)
+
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Network Widgets Quick Qml QuickTest QuickControls2)
diff --git a/examples/multimedia/video/qmlvideo/CMakeLists.txt b/examples/multimedia/video/qmlvideo/CMakeLists.txt
index 3aeab9731..d2e9e1f4d 100644
--- a/examples/multimedia/video/qmlvideo/CMakeLists.txt
+++ b/examples/multimedia/video/qmlvideo/CMakeLists.txt
@@ -119,11 +119,8 @@ qt6_add_resources(qmlvideo "qmlvideo"
FILES
${qmlvideo_resource_files}
)
-set_source_files_properties("../snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml"
- PROPERTIES QT_RESOURCE_ALIAS "qml/frequencymonitor/FrequencyItem.qml"
-)
set(frequencymonitordeclarative_resource_files
- "qml/frequencymonitor/FrequencyItem.qml"
+ "../snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml"
)
qt6_add_resources(qmlvideo "frequencymonitordeclarative"
@@ -134,11 +131,8 @@ qt6_add_resources(qmlvideo "frequencymonitordeclarative"
FILES
${frequencymonitordeclarative_resource_files}
)
-set_source_files_properties("../snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml"
- PROPERTIES QT_RESOURCE_ALIAS "qml/performancemonitor/PerformanceItem.qml"
-)
set(performancemonitordeclarative_resource_files
- "qml/performancemonitor/PerformanceItem.qml"
+ "../snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml"
)
qt6_add_resources(qmlvideo "performancemonitordeclarative"
diff --git a/examples/multimedia/video/qmlvideofx/CMakeLists.txt b/examples/multimedia/video/qmlvideofx/CMakeLists.txt
index 103e259ee..c833d82f5 100644
--- a/examples/multimedia/video/qmlvideofx/CMakeLists.txt
+++ b/examples/multimedia/video/qmlvideofx/CMakeLists.txt
@@ -130,11 +130,8 @@ qt6_add_resources(qmlvideofx "qmlvideofx"
FILES
${qmlvideofx_resource_files}
)
-set_source_files_properties("../snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml"
- PROPERTIES QT_RESOURCE_ALIAS "qml/frequencymonitor/FrequencyItem.qml"
-)
set(frequencymonitordeclarative_resource_files
- "qml/frequencymonitor/FrequencyItem.qml"
+ "../snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml"
)
qt6_add_resources(qmlvideofx "frequencymonitordeclarative"
@@ -145,11 +142,8 @@ qt6_add_resources(qmlvideofx "frequencymonitordeclarative"
FILES
${frequencymonitordeclarative_resource_files}
)
-set_source_files_properties("../snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml"
- PROPERTIES QT_RESOURCE_ALIAS "qml/performancemonitor/PerformanceItem.qml"
-)
set(performancemonitordeclarative_resource_files
- "qml/performancemonitor/PerformanceItem.qml"
+ "../snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml"
)
qt6_add_resources(qmlvideofx "performancemonitordeclarative"