C

Qt Quick Ultralite font_bindings Example

# Copyright (C) 2026 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial
cmake_minimum_required(VERSION 3.21.1)

project(font_bindings VERSION 0.0.1 LANGUAGES C CXX ASM)

find_package(QulApp)

if(TARGET Qul::MonotypeSpark)
    if(QUL_PLATFORM MATCHES "autosar")
        qul_add_library(font_bindings)
    else()
        qul_add_executable(font_bindings)
    endif()

    qul_add_qml_module(font_bindings
        URI FontBindingsApp
        QML_FILES font_bindings.qml
    )

    target_link_libraries(font_bindings PRIVATE Qul::Controls)

    set_target_properties(font_bindings PROPERTIES
        QUL_FONT_ENGINE "Spark"
        QUL_DEFAULT_FONT_FAMILY "Roboto"
        QUL_FONT_CACHE_SIZE 1
        QUL_FONT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/RobotoFonts.fmp"
    )

    app_target_setup_os(font_bindings)
    app_target_default_entrypoint(font_bindings font_bindings MODULE FontBindingsApp)
endif()