C
Qt Quick Ultralite Watch Demo
cmake_minimum_required (VERSION 3.15) project(watch VERSION 0.0.1 LANGUAGES C CXX ASM) if (NOT TARGET Qul::Core) find_package(Qul) endif() qul_add_target(watch src/WatchModel.cpp src/HealthModel.cpp ) qul_target_generate_interfaces(watch inc/WatchModel.h inc/HealthModel.h ) target_include_directories(watch PUBLIC inc) set(COMMON_QML_FILES watch.qml WatchShield.qml WeatherWidget.qml HealthWidget.qml WidgetsRow.qml ApplicationList.qml CompassWidget.qml ) set(MODULE_QML_FILES imports/Watch/Theme.qml imports/Watch/MainModel.qml ) set(FONT_FILES Montserrat-Black.ttf Montserrat-BlackItalic.ttf Montserrat-Bold.ttf Montserrat-BoldItalic.ttf Montserrat-ExtraBold.ttf Montserrat-ExtraBoldItalic.ttf Montserrat-ExtraLight.ttf Montserrat-ExtraLightItalic.ttf Montserrat-Light.ttf Montserrat-LightItalic.ttf Montserrat-Medium.ttf Montserrat-MediumItalic.ttf Montserrat-Regular.ttf Montserrat-RegularItalic.ttf Montserrat-SemiBold.ttf Montserrat-SemiBoldItalic.ttf Montserrat-Thin.ttf Montserrat-ThinItalic.ttf ) list(TRANSFORM FONT_FILES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/fonts/) set_source_files_properties( images/shield/hand-minute.png images/shield/hand-hour.png images/shield/hand-second.png images/compass/arrows.png PROPERTIES QUL_RESOURCE_OPTIMIZE_FOR_ROTATION OFF) qul_add_resource(watch FILES images/compass/ring1.png images/compass/E.png images/compass/ring2.png images/compass/arrows.png images/compass/middleback.png images/compass/N.png images/compass/S.png images/compass/W.png images/weather/ion-ios-sunny-outline.png images/weather/w-bottom-mask.png images/weather/big-sun.png images/weather/ion-ios-partlysunny-outline.png images/weather/w-vertical.png images/weather/ion-ios-rainy-outline.png images/list/sport-app-big.png images/list/sport-app.png images/list/compass-big.png images/list/settings.png images/list/your-health-big.png images/list/settings-big.png images/list/compass.png images/list/tools.png images/list/your-health.png images/list/tools-big.png images/health/vertical-line.png images/health/graph.png images/health/graph-point.png images/health/horizontal-line.png images/health/heart.png images/shield/hand-minute.png images/shield/dots-all.png images/shield/battery.png images/shield/hands-middle-dot.png images/shield/steps.png images/shield/battery-icon.png images/shield/heart.png images/shield/small-oval-alt.png images/shield/hand-hour.png images/shield/steps-icon.png images/shield/hand-second.png ) qul_target_qml_sources(watch ${COMMON_QML_FILES}) set_target_properties(watch PROPERTIES QUL_FONT_FILES "${FONT_FILES}" QUL_DEFAULT_FONT_FAMILY "Montserrat" ) qul_add_qml_module(watch_module URI Watch QML_FILES ${MODULE_QML_FILES} OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/modules # avoid Watch/ and watch in the same dir ) target_link_libraries(watch PRIVATE Qul::ControlsTemplates watch_module) app_target_setup_os(watch) app_target_default_entrypoint(watch watch)