C

Qt Quick Ultralite image_loading Example

cmake_minimum_required (VERSION 3.17.3)

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

# Set FreeRTOS heap size (needed for image on heap)
if (OS STREQUAL "FreeRTOS")
    math(EXPR heap_size "1024 * 1024")
    add_compile_definitions(configTOTAL_HEAP_SIZE=${heap_size})
endif()

qul_add_target(image_loading myimageloader.cpp)

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

qul_target_qml_sources(image_loading image_loading.qml)

target_link_libraries(image_loading Qul::QuickUltraliteControlsStyleDefault)
app_target_setup_os(image_loading)