C

Qt Quick Ultralite swipegame Demo

cmake_minimum_required (VERSION 3.17.3)

project(swipe_game VERSION 0.0.1 LANGUAGES C CXX ASM)

if (NOT TARGET Qul::QuickUltralite)
    find_package(Qul)
endif()

qul_add_target(swipe_game
    Globals.cpp
    HighscoreModel.cpp)

qul_target_generate_interfaces(swipe_game
    Globals.h
    HighscoreModel.h)

qul_target_qml_sources(swipe_game
    BaseView.qml
    Button.qml
    CircularSwipeArea.qml
    ConfigContainer.qml
    ConfigView.qml
    DirectionalSwipeArea.qml
    GameContainer.qml
    GameOverView.qml
    GameRunningView.qml
    GameStartView.qml
    HighscoreView.qml
    LabeledSwitch.qml
    NumberView.qml
    ScrollIndicator.qml
    StartView.qml
    SwipeGame.qml
    TimeView.qml)

set(STYLE_MODULE_QML_FILES
    style_module/Style.qml)

qul_add_qml_module(style_module
    URI StyleModule
    QML_FILES
        ${STYLE_MODULE_QML_FILES}
    OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/style_module)

set_target_properties(swipe_game PROPERTIES QUL_GLYPHS_COPY_TO_RAM "Never")

set(QUL_DEFAULT_OPTIMIZE_FOR_ROTATION ON)
set(QUL_DEFAULT_OPTIMIZE_FOR_SCALE ON)
set_source_files_properties(images/mask_circle.svg PROPERTIES QUL_OPTIMIZE_FOR_ROTATION OFF)
set_source_files_properties(images/mask_circle_highlight.svg PROPERTIES QUL_OPTIMIZE_FOR_ROTATION OFF)

file(GLOB image_assets "images/*.svg")
qul_add_resource(swipe_game FILES
    ${image_assets} BASE images)

target_link_libraries(swipe_game style_module)

app_target_setup_os(swipe_game)
app_target_default_main(swipe_game SwipeGame)