From 8d9ffe8ae68d34b05e6219fd9f1fc5009638e4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 8 Jul 2021 17:42:32 +0200 Subject: Get rid of shared snippets directory Avoiding code duplication is a noble goal, but the examples need to be self-contained. E.g. Qt Creator sometimes does copy the example (and just the example) to a tmp directory, where navigating out of the source directory will fail. Pick-to: 6.2 Change-Id: I009c3f253fea9bf260f9cd58a58f2541a249d3af Reviewed-by: Lars Knoll --- examples/multimedia/video/qmlvideo/CMakeLists.txt | 38 ++++------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'examples/multimedia/video/qmlvideo/CMakeLists.txt') diff --git a/examples/multimedia/video/qmlvideo/CMakeLists.txt b/examples/multimedia/video/qmlvideo/CMakeLists.txt index d2e9e1f4d..dce82772a 100644 --- a/examples/multimedia/video/qmlvideo/CMakeLists.txt +++ b/examples/multimedia/video/qmlvideo/CMakeLists.txt @@ -22,10 +22,10 @@ find_package(Qt6 COMPONENTS Multimedia) find_package(Qt6 COMPONENTS Qml) qt_add_executable(qmlvideo - ../snippets/frequencymonitor/frequencymonitor.cpp ../snippets/frequencymonitor/frequencymonitor.h - ../snippets/frequencymonitor/frequencymonitordeclarative.cpp - ../snippets/performancemonitor/performancemonitor.cpp ../snippets/performancemonitor/performancemonitor.h - ../snippets/performancemonitor/performancemonitordeclarative.cpp ../snippets/performancemonitor/performancemonitordeclarative.h + frequencymonitor.cpp frequencymonitor.h + frequencymonitordeclarative.cpp + performancemonitor.cpp performancemonitor.h + performancemonitordeclarative.cpp performancemonitordeclarative.h main.cpp trace.h ) @@ -34,10 +34,6 @@ set_target_properties(qmlvideo PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ) -target_include_directories(qmlvideo PUBLIC - ../snippets/frequencymonitor - ../snippets/performancemonitor -) target_compile_definitions(qmlvideo PUBLIC FREQUENCYMONITOR_SUPPORT @@ -67,6 +63,8 @@ set(qmlvideo_resource_files "images/folder.png" "images/leaves.jpg" "images/up.png" + "qml/frequencymonitor/FrequencyItem.qml" + "qml/performancemonitor/PerformanceItem.qml" "qml/qmlvideo/Button.qml" "qml/qmlvideo/CameraBasic.qml" "qml/qmlvideo/CameraDrag.qml" @@ -119,30 +117,6 @@ qt6_add_resources(qmlvideo "qmlvideo" FILES ${qmlvideo_resource_files} ) -set(frequencymonitordeclarative_resource_files - "../snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml" -) - -qt6_add_resources(qmlvideo "frequencymonitordeclarative" - PREFIX - "/" - BASE - "../snippets/frequencymonitor" - FILES - ${frequencymonitordeclarative_resource_files} -) -set(performancemonitordeclarative_resource_files - "../snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml" -) - -qt6_add_resources(qmlvideo "performancemonitordeclarative" - PREFIX - "/" - BASE - "../snippets/performancemonitor" - FILES - ${performancemonitordeclarative_resource_files} -) install(TARGETS qmlvideo RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" -- cgit v1.2.3