aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/dynamicscene/CMakeLists.txt
diff options
context:
space:
mode:
authorOliver Eftevaag <oliver.eftevaag@qt.io>2021-08-12 17:07:36 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-03 08:56:05 +0000
commitd1d1137a2cf78cce5c4a4d2898e319775e4602b5 (patch)
tree5238e3d40f00591896ad6921500a53c1feebf1b5 /examples/qml/dynamicscene/CMakeLists.txt
parentcf68bf4e7e48cf44c95e06f9dffe36ed2f40326a (diff)
Replace custom button component with QQC2 buttons
Now that we've moved qtquickcontrols2 into the qtdeclarative submodule. We want our examples to simply use qqc2 controls, rather than custom made buttons and other controls. This example used a custom made button component, which this patch will replace with qqc2. It will also use qqc2 in other places where it makes sense, like replacing a TextEdit with a qqc2 TextArea, and Text components with qqc2 Labels. Task-number: QTBUG-95733 Change-Id: Ic733cd592cd10ef2cf45058aaf08a0f6b2f5bd2c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit dad9a15c9c5734334e6e3768eab096968515e36f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/qml/dynamicscene/CMakeLists.txt')
-rw-r--r--examples/qml/dynamicscene/CMakeLists.txt67
1 files changed, 67 insertions, 0 deletions
diff --git a/examples/qml/dynamicscene/CMakeLists.txt b/examples/qml/dynamicscene/CMakeLists.txt
new file mode 100644
index 0000000000..9353c35427
--- /dev/null
+++ b/examples/qml/dynamicscene/CMakeLists.txt
@@ -0,0 +1,67 @@
+# Generated from dynamicscene.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(dynamicscene LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qml/dynamicscene")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 COMPONENTS Qml)
+
+qt_add_executable(dynamicscene
+ main.cpp
+)
+set_target_properties(dynamicscene PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(dynamicscene PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(dynamicscene_resource_files
+ "content/GenericSceneItem.qml"
+ "content/PaletteItem.qml"
+ "content/PerspectiveItem.qml"
+ "content/Sun.qml"
+ "content/images/NOTE"
+ "content/images/face-smile.png"
+ "content/images/moon.png"
+ "content/images/rabbit_brown.png"
+ "content/images/rabbit_bw.png"
+ "content/images/star.png"
+ "content/images/sun.png"
+ "content/images/tree_s.png"
+ "content/itemCreation.js"
+ "dynamicscene.qml"
+)
+
+qt6_add_resources(dynamicscene "dynamicscene"
+ PREFIX
+ "/"
+ FILES
+ ${dynamicscene_resource_files}
+)
+
+install(TARGETS dynamicscene
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)