summaryrefslogtreecommitdiffstats
path: root/examples/demos/clocks
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2020-04-30 16:13:46 +0200
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2020-05-04 23:00:45 +0200
commitde6cc8c379012cd2145fa9cc61b4cc6044fd8c07 (patch)
tree320eac318aa61764acd07b4f62694c99f99c00d6 /examples/demos/clocks
parent9043b57823b291012d1b041a2bc3861b253c1a24 (diff)
CMake: Port the build setup to CMake
Fixes: QTBUG-83910 Change-Id: If0ebd9d0b528cd84ffe92955b7d1c4d580d397fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/demos/clocks')
-rw-r--r--examples/demos/clocks/CMakeLists.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/examples/demos/clocks/CMakeLists.txt b/examples/demos/clocks/CMakeLists.txt
new file mode 100644
index 000000000..c3385e9da
--- /dev/null
+++ b/examples/demos/clocks/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from clocks.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(clocks LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/demos/clocks")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(clocks
+ main.cpp
+)
+target_link_libraries(clocks PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(clocks_resource_files
+ "clocks.qml"
+ "content/Clock.qml"
+ "content/arrow.png"
+ "content/background.png"
+ "content/center.png"
+ "content/clock-night.png"
+ "content/clock.png"
+ "content/hour.png"
+ "content/minute.png"
+ "content/quit.png"
+ "content/second.png"
+)
+
+qt6_add_resources(clocks "clocks"
+ PREFIX
+ "/demos/clocks"
+ FILES
+ ${clocks_resource_files}
+)
+
+install(TARGETS clocks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)