C

Qt Quick Ultralite image_loading Example

cmake_minimum_required (VERSION 3.21.1)

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

# Set FreeRTOS heap size (needed for image on heap)
if (QUL_OS STREQUAL "FreeRTOS" AND NOT QUL_PLATFORM MATCHES "^mimxrt1170")
    math(EXPR heap_size "300 * 1024")
    add_compile_definitions(configTOTAL_HEAP_SIZE=${heap_size})
endif()

qul_add_target(image_loading myimageloader.cpp QML_PROJECT mcu_image_loading.qmlproject)

if (QUL_OS STREQUAL "FreeRTOS")
    target_sources(image_loading PRIVATE
                   main_freertos.cpp
    )
else()
    target_sources(image_loading PRIVATE
                   main_baremetal.cpp
    )
endif()

app_target_setup_os(image_loading)