summaryrefslogtreecommitdiffstats
path: root/examples/sensors
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sensors')
-rw-r--r--examples/sensors/CMakeLists.txt20
-rw-r--r--examples/sensors/accelbubble/CMakeLists.txt52
-rw-r--r--examples/sensors/grue/CMakeLists.txt56
-rw-r--r--examples/sensors/grue/console_app/CMakeLists.txt36
-rw-r--r--examples/sensors/grue/import/import.pro1
-rw-r--r--examples/sensors/grue/lib/CMakeLists.txt38
-rw-r--r--examples/sensors/grue/plugin/CMakeLists.txt56
-rw-r--r--examples/sensors/maze/CMakeLists.txt65
-rw-r--r--examples/sensors/qmlqtsensors/CMakeLists.txt54
-rw-r--r--examples/sensors/qmlsensorgestures/CMakeLists.txt51
-rw-r--r--examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt38
-rw-r--r--examples/sensors/sensor_explorer/CMakeLists.txt54
-rw-r--r--examples/sensors/sensor_explorer/import/import.pro1
-rw-r--r--examples/sensors/sensorgestures/CMakeLists.txt37
-rw-r--r--examples/sensors/shakeit/CMakeLists.txt53
15 files changed, 612 insertions, 0 deletions
diff --git a/examples/sensors/CMakeLists.txt b/examples/sensors/CMakeLists.txt
new file mode 100644
index 00000000..8112bf57
--- /dev/null
+++ b/examples/sensors/CMakeLists.txt
@@ -0,0 +1,20 @@
+# TODO Qt 6.2 enable grue example, requires work
+# add_subdirectory(grue)
+
+if(TARGET Qt::Quick)
+ add_subdirectory(maze)
+ # TODO Qt 6.2 enable qmlsensorgestures, requires work
+ # add_subdirectory(qmlsensorgestures)
+ add_subdirectory(qmlqtsensors)
+ # TODO Qt 6.2 enable sensor_explorer, requires work
+ # add_subdirectory(sensor_explorer)
+ if (TARGET Qt::Multimedia)
+ add_subdirectory(shakeit)
+ endif()
+ if(TARGET Qt::Svg)
+ add_subdirectory(accelbubble)
+ endif()
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(sensorgestures)
+endif()
diff --git a/examples/sensors/accelbubble/CMakeLists.txt b/examples/sensors/accelbubble/CMakeLists.txt
new file mode 100644
index 00000000..8d752931
--- /dev/null
+++ b/examples/sensors/accelbubble/CMakeLists.txt
@@ -0,0 +1,52 @@
+cmake_minimum_required(VERSION 3.14)
+project(accelbubble 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}/sensors/accelbubble")
+
+find_package(Qt6 COMPONENTS Core Gui Quick Sensors Svg Xml)
+
+qt_add_executable(accelbubble
+ main.cpp
+)
+set_target_properties(accelbubble PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(accelbubble PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+ Qt::Sensors
+ Qt::Svg
+ Qt::Xml
+)
+
+
+# Resources:
+set(accelbubble_resource_files
+ "accelbubble.qml"
+ "content/Bluebubble.svg"
+)
+
+qt6_add_resources(accelbubble "accelbubble"
+ PREFIX
+ "/"
+ FILES
+ ${accelbubble_resource_files}
+)
+
+install(TARGETS accelbubble
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/grue/CMakeLists.txt b/examples/sensors/grue/CMakeLists.txt
new file mode 100644
index 00000000..043330d3
--- /dev/null
+++ b/examples/sensors/grue/CMakeLists.txt
@@ -0,0 +1,56 @@
+cmake_minimum_required(VERSION 3.14)
+project(grue_app 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}/sensors/grue")
+
+find_package(Qt6 COMPONENTS Quick)
+
+qt_add_executable(grue_app
+ main.cpp
+)
+set_target_properties(grue_app PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+if(TARGET Qt::Quick)
+ target_link_libraries(grue_app PUBLIC
+ Qt::Quick
+ )
+endif()
+
+# Resources:
+set(qml_resource_files
+ "grue.png"
+ "grue.qml"
+)
+
+qt6_add_resources(grue_app "qml"
+ PREFIX
+ "/"
+ FILES
+ ${qml_resource_files}
+)
+
+install(TARGETS grue_app
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
+add_subdirectory(lib)
+add_subdirectory(plugin)
+add_subdirectory(console_app)
+if(TARGET Qt::Quick)
+ add_subdirectory(import)
+endif()
diff --git a/examples/sensors/grue/console_app/CMakeLists.txt b/examples/sensors/grue/console_app/CMakeLists.txt
new file mode 100644
index 00000000..e6364e48
--- /dev/null
+++ b/examples/sensors/grue/console_app/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from console_app.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(detect_grue 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}/sensors/grue")
+
+find_package(Qt6 COMPONENTS Core Sensors)
+
+qt_add_executable(detect_grue
+ main.cpp
+)
+set_target_properties(detect_grue PROPERTIES
+ WIN32_EXECUTABLE FALSE
+ MACOSX_BUNDLE FALSE
+)
+target_link_libraries(detect_grue PUBLIC
+ Qt::Core
+ Qt::Sensors
+)
+
+install(TARGETS detect_grue
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro
index 17d7713e..f9d5108d 100644
--- a/examples/sensors/grue/import/import.pro
+++ b/examples/sensors/grue/import/import.pro
@@ -1,5 +1,6 @@
TEMPLATE = lib
CONFIG += plugin
+QML_IMPORT_VERSION = $$QT_VERSION
TARGET = $$qtLibraryTarget(declarative_grue)
diff --git a/examples/sensors/grue/lib/CMakeLists.txt b/examples/sensors/grue/lib/CMakeLists.txt
new file mode 100644
index 00000000..264ffd32
--- /dev/null
+++ b/examples/sensors/grue/lib/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.14)
+project(gruesensor 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}/sensors/grue")
+
+find_package(Qt6 COMPONENTS Core Sensors)
+
+qt_add_executable(gruesensor
+ gruesensor.cpp gruesensor.h gruesensor_p.h
+)
+set_target_properties(gruesensor PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_compile_definitions(gruesensor PUBLIC
+ QT_BUILD_GRUE_LIB
+)
+
+target_link_libraries(gruesensor PUBLIC
+ Qt::Core
+ Qt::Sensors
+)
+
+install(TARGETS gruesensor
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/grue/plugin/CMakeLists.txt b/examples/sensors/grue/plugin/CMakeLists.txt
new file mode 100644
index 00000000..d55cc2dc
--- /dev/null
+++ b/examples/sensors/grue/plugin/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from plugin.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(qtsensors_grue 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}/sensors/grue/sensors")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Sensors)
+
+qt_add_plugin(qtsensors_grue)
+target_sources(qtsensors_grue PRIVATE
+ gruesensorimpl.cpp gruesensorimpl.h
+ main.cpp
+)
+set_target_properties(qtsensors_grue PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_include_directories(qtsensors_grue PUBLIC
+ ../lib
+)
+
+target_link_libraries(qtsensors_grue PUBLIC
+ Qt::Core
+ Qt::Sensors
+ gruesensor
+)
+
+if(MACOS)
+ target_link_libraries(qtsensors_grue PUBLIC
+ # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../grue_app.app/Contents/Frameworks
+ )
+endif()
+
+if(NOT MACOS)
+ target_link_libraries(qtsensors_grue PUBLIC
+ # Remove: L${CMAKE_CURRENT_BINARY_DIR}/..
+ )
+endif()
+
+install(TARGETS qtsensors_grue
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/maze/CMakeLists.txt b/examples/sensors/maze/CMakeLists.txt
new file mode 100644
index 00000000..a2c484ac
--- /dev/null
+++ b/examples/sensors/maze/CMakeLists.txt
@@ -0,0 +1,65 @@
+cmake_minimum_required(VERSION 3.14)
+project(maze 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}/sensors/maze")
+
+find_package(Qt6 COMPONENTS Core Gui Quick Sensors)
+
+qt_add_executable(maze
+ main.cpp
+)
+set_target_properties(maze PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(maze PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+ Qt::Sensors
+)
+
+
+# Resources:
+set(maze_resource_files
+ "Congratulation.qml"
+ "LabyrinthSquare.qml"
+ "Mouse.qml"
+ "components/ApplicationWindow.qml"
+ "components/Button.qml"
+ "components/images/button_background_disabled.png"
+ "components/images/button_background_normal.png"
+ "components/images/button_background_pressed.png"
+ "content/00.png"
+ "content/01.png"
+ "content/cheese.png"
+ "content/cheeseeating.gif"
+ "content/congratulations.gif"
+ "content/mouse_down.gif"
+ "content/start.png"
+ "lib.js"
+ "maze.qml"
+)
+
+qt6_add_resources(maze "maze"
+ PREFIX
+ "/"
+ FILES
+ ${maze_resource_files}
+)
+
+install(TARGETS maze
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/qmlqtsensors/CMakeLists.txt b/examples/sensors/qmlqtsensors/CMakeLists.txt
new file mode 100644
index 00000000..ab743436
--- /dev/null
+++ b/examples/sensors/qmlqtsensors/CMakeLists.txt
@@ -0,0 +1,54 @@
+cmake_minimum_required(VERSION 3.14)
+project(qmlqtsensors 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}/sensors/qmlqtsensors")
+
+find_package(Qt6 COMPONENTS Core Gui Quick)
+
+qt_add_executable(qmlqtsensors
+ main.cpp
+)
+set_target_properties(qmlqtsensors PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(qmlqtsensors PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+)
+
+
+# Resources:
+set(qmlqtsensors_resource_files
+ "components/ApplicationWindow.qml"
+ "components/Button.qml"
+ "components/Divider.qml"
+ "components/images/button_background_disabled.png"
+ "components/images/button_background_normal.png"
+ "components/images/button_background_pressed.png"
+ "qmlqtsensors.qml"
+)
+
+qt6_add_resources(qmlqtsensors "qmlqtsensors"
+ PREFIX
+ "/"
+ FILES
+ ${qmlqtsensors_resource_files}
+)
+
+install(TARGETS qmlqtsensors
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/qmlsensorgestures/CMakeLists.txt b/examples/sensors/qmlsensorgestures/CMakeLists.txt
new file mode 100644
index 00000000..a3f01f0e
--- /dev/null
+++ b/examples/sensors/qmlsensorgestures/CMakeLists.txt
@@ -0,0 +1,51 @@
+cmake_minimum_required(VERSION 3.14)
+project(qmlsensorgestures 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}/sensors/qmlsensorgestures")
+
+find_package(Qt6 COMPONENTS Quick)
+
+qt_add_executable(qmlsensorgestures
+ main.cpp
+)
+set_target_properties(qmlsensorgestures PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(qmlsensorgestures PUBLIC
+ Qt::Quick
+)
+
+
+# Resources:
+set(qml_resource_files
+ "Button.qml"
+ "GestureList.qml"
+ "GestureView.qml"
+ "GesturesView.qml"
+ "qmlsensorgestures.qml"
+)
+
+qt6_add_resources(qmlsensorgestures "qml"
+ PREFIX
+ "/"
+ FILES
+ ${qml_resource_files}
+)
+
+install(TARGETS qmlsensorgestures
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+add_subdirectory(plugin)
diff --git a/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt b/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt
new file mode 100644
index 00000000..c5831189
--- /dev/null
+++ b/examples/sensors/qmlsensorgestures/plugin/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.14)
+project(qtsensorgestures_counterplugin 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}")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Sensors)
+
+qt_add_executable(qtsensorgestures_counterplugin
+ qcountergestureplugin.cpp qcountergestureplugin.h
+ qcounterrecognizer.cpp qcounterrecognizer.h
+)
+set_target_properties(qtsensorgestures_counterplugin PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(qtsensorgestures_counterplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Sensors
+)
+
+install(TARGETS qtsensorgestures_counterplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/sensor_explorer/CMakeLists.txt b/examples/sensors/sensor_explorer/CMakeLists.txt
new file mode 100644
index 00000000..3440f79b
--- /dev/null
+++ b/examples/sensors/sensor_explorer/CMakeLists.txt
@@ -0,0 +1,54 @@
+cmake_minimum_required(VERSION 3.14)
+project(sensor_explorer 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}/sensors/sensor_explorer")
+
+find_package(Qt6 COMPONENTS Qml Quick)
+
+qt_add_executable(sensor_explorer
+ main.cpp
+)
+set_target_properties(sensor_explorer PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(sensor_explorer PUBLIC
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(qml_resource_files
+ "sensor_explorer.qml"
+)
+
+qt6_add_resources(sensor_explorer "qml"
+ PREFIX
+ "/"
+ FILES
+ ${qml_resource_files}
+)
+
+if(TARGET Qt::Widgets)
+ target_link_libraries(sensor_explorer PUBLIC
+ Qt::Widgets
+ )
+endif()
+
+install(TARGETS sensor_explorer
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+add_subdirectory(import)
diff --git a/examples/sensors/sensor_explorer/import/import.pro b/examples/sensors/sensor_explorer/import/import.pro
index 48509214..53bf224b 100644
--- a/examples/sensors/sensor_explorer/import/import.pro
+++ b/examples/sensors/sensor_explorer/import/import.pro
@@ -1,5 +1,6 @@
TEMPLATE = lib
CONFIG += plugin
+QML_IMPORT_VERSION = $$QT_VERSION
TARGET = $$qtLibraryTarget(declarative_explorer)
diff --git a/examples/sensors/sensorgestures/CMakeLists.txt b/examples/sensors/sensorgestures/CMakeLists.txt
new file mode 100644
index 00000000..a80f70f9
--- /dev/null
+++ b/examples/sensors/sensorgestures/CMakeLists.txt
@@ -0,0 +1,37 @@
+cmake_minimum_required(VERSION 3.14)
+project(gesture 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}/sensors/sensorgestures")
+
+find_package(Qt6 COMPONENTS Core Gui Sensors Widgets)
+
+qt_add_executable(gesture
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+)
+set_target_properties(gesture PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(gesture PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Sensors
+ Qt::Widgets
+)
+
+install(TARGETS gesture
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sensors/shakeit/CMakeLists.txt b/examples/sensors/shakeit/CMakeLists.txt
new file mode 100644
index 00000000..aaacd2f1
--- /dev/null
+++ b/examples/sensors/shakeit/CMakeLists.txt
@@ -0,0 +1,53 @@
+cmake_minimum_required(VERSION 3.14)
+project(shakeit 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}/sensors/shakeit")
+
+find_package(Qt6 COMPONENTS Core Gui Quick)
+
+qt_add_executable(shakeit
+ main.cpp
+)
+set_target_properties(shakeit PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(shakeit PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+)
+
+
+# Resources:
+set(shakeit_resource_files
+ "audio/loopy2a_mono.wav"
+ "audio/phone.wav"
+ "content/triangle.png"
+ "content/triangle2.png"
+ "content/triangle3.png"
+ "shakeit.qml"
+)
+
+qt6_add_resources(shakeit "shakeit"
+ PREFIX
+ "/"
+ FILES
+ ${shakeit_resource_files}
+)
+
+install(TARGETS shakeit
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)