C
Qt Quick Ultralite image_loading Example
# Copyright (C) 2026 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial
cmake_minimum_required(VERSION 3.21.1)
project(image_loading VERSION 0.0.1 LANGUAGES C CXX ASM)
find_package(QulApp)
if(QUL_PLATFORM MATCHES "autosar")
qul_add_library(image_loading)
else()
qul_add_executable(image_loading)
endif()
qul_add_qml_module(image_loading
URI ImageLoadingApp
QML_FILES image_loading.qml
NO_SBOM
)
target_sources(image_loading PRIVATE myimageloader.cpp)
target_link_libraries(image_loading PRIVATE Qul::Controls)
# Set FreeRTOS heap size (needed for image on heap)
if (QUL_OS STREQUAL "FreeRTOS" AND NOT QUL_PLATFORM MATCHES "^mimxrt1")
qul_override_freertos_heap_size(image_loading "300 * 1024")
endif()
if(QUL_OS_LOWERCASE STREQUAL "autosar")
target_sources(image_loading PRIVATE
qul_run.cpp
)
elseif (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)