diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2020-04-30 16:13:46 +0200 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2020-05-04 23:00:45 +0200 |
commit | de6cc8c379012cd2145fa9cc61b4cc6044fd8c07 (patch) | |
tree | 320eac318aa61764acd07b4f62694c99f99c00d6 /examples/tutorials | |
parent | 9043b57823b291012d1b041a2bc3861b253c1a24 (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/tutorials')
-rw-r--r-- | examples/tutorials/alarms/CMakeLists.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/examples/tutorials/alarms/CMakeLists.txt b/examples/tutorials/alarms/CMakeLists.txt new file mode 100644 index 000000000..797f5a528 --- /dev/null +++ b/examples/tutorials/alarms/CMakeLists.txt @@ -0,0 +1,49 @@ +# Generated from alarms.pro. + +cmake_minimum_required(VERSION 3.14) +project(alarms 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/alarms") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(alarms + main.cpp +) +target_link_libraries(alarms PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + + +# Resources: +set(qml_resource_files + "AlarmDelegate.qml" + "AlarmDialog.qml" + "AlarmModel.qml" + "TumblerDelegate.qml" + "main.qml" + "qtquickcontrols2.conf" +) + +qt6_add_resources(alarms "qml" + PREFIX + "/" + FILES + ${qml_resource_files} +) + +install(TARGETS alarms + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |