summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate-game
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-07-03 07:35:18 +0200
committerOliver Wolff <oliver.wolff@qt.io>2020-07-03 07:35:56 +0200
commit4caa0e80c57e8ecb081e1888425fafabd7da22f6 (patch)
tree6d8b3367fc11d07a32066f26b3864a30511051c1 /examples/bluetooth/heartrate-game
parent10cdfbff16a8572f8c2b0595be0f3dc24d069b6c (diff)
parenteb2e434dda5c46028474c76ce5f4921a7217b45c (diff)
Merge remote-tracking branch 'origin/wip/cmake' into dev
Diffstat (limited to 'examples/bluetooth/heartrate-game')
-rw-r--r--examples/bluetooth/heartrate-game/CMakeLists.txt79
1 files changed, 79 insertions, 0 deletions
diff --git a/examples/bluetooth/heartrate-game/CMakeLists.txt b/examples/bluetooth/heartrate-game/CMakeLists.txt
new file mode 100644
index 00000000..8d82dfb1
--- /dev/null
+++ b/examples/bluetooth/heartrate-game/CMakeLists.txt
@@ -0,0 +1,79 @@
+# Generated from heartrate-game.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(heartrate-game LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/bluetooth/heartrate-game")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 COMPONENTS Bluetooth)
+
+add_qt_gui_executable(heartrate-game
+ bluetoothbaseclass.cpp bluetoothbaseclass.h
+ connectionhandler.cpp connectionhandler.h
+ devicefinder.cpp devicefinder.h
+ devicehandler.cpp devicehandler.h
+ deviceinfo.cpp deviceinfo.h
+ heartrate-global.h
+ main.cpp
+)
+target_link_libraries(heartrate-game PUBLIC
+ Qt::Bluetooth
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(qml_resource_files
+ "qml/App.qml"
+ "qml/BluetoothAlarmDialog.qml"
+ "qml/BottomLine.qml"
+ "qml/Connect.qml"
+ "qml/GameButton.qml"
+ "qml/GamePage.qml"
+ "qml/GameSettings.qml"
+ "qml/Measure.qml"
+ "qml/SplashScreen.qml"
+ "qml/Stats.qml"
+ "qml/StatsLabel.qml"
+ "qml/TitleBar.qml"
+ "qml/main.qml"
+ "qml/qmldir"
+)
+
+qt6_add_resources(heartrate-game "qml"
+ PREFIX
+ "/"
+ FILES
+ ${qml_resource_files}
+)
+set(images_resource_files
+ "qml/images/bt_off_to_on.png"
+ "qml/images/heart.png"
+ "qml/images/logo.png"
+)
+
+qt6_add_resources(heartrate-game "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+install(TARGETS heartrate-game
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)