C

Qt Quick Ultralite tvii_effects Example

cmake_minimum_required (VERSION 3.17.3)

project(tvii_effects VERSION 0.0.1 LANGUAGES C CXX ASM)
if (NOT TARGET Qul::QuickUltralite)
    find_package(Qul)
endif()

add_subdirectory(effects)

qul_add_target(tvii_effects main.cpp)

qul_target_qml_sources(tvii_effects
    tvii_effects.qml
    Gauge.qml
    BaseGauge.qml
)

qul_add_qml_module(tvii_effects_speed_module
    URI Automotive
    QML_FILES
        Units.qml
        Style.qml
    OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/modules
)

target_include_directories(tvii_effects_speed_module PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)

target_link_libraries(tvii_effects tvii_effects_speed_module tvii_effects_module)

set_source_files_properties(
    images/needle-normal.png
    images/needle-mask.png
    images/ak.png
    images/juno.png
    images/cover.jpg
    images/opacity-mask.png
    PROPERTIES
        QUL_INTERNAL_SPLIT_IMAGE_OPTIMIZATION OFF)

set_source_files_properties(
    images/needle-normal.png
    PROPERTIES
        QUL_INTERNAL_OPTIMIZE_MONOCHROME_TO_ALPHA8 OFF)

qul_add_resource(tvii_effects FILES
    images/gauge-gauge-frame.png
    images/highlight-normal.png
    images/needle-normal.png
    images/needle-mask.png
    images/opacity-mask.png
    images/ak.png
    images/juno.png
    images/cover.jpg
    )

if(QUL_PLATFORM MATCHES "^tviic2d")
    target_link_libraries(tvii_effects Qul::QuickUltraliteTraveoIIExtras)
else()
    message(FATAL_ERROR "tvii_effects example is only supported on Infineon/Cypress Traveo II boards")
endif()

app_target_setup_os(tvii_effects)