C

Qt Quick Ultralite translation Example

cmake_minimum_required (VERSION 3.21.1)

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

# Set up a target that includes all bundled languages
qul_add_target(translation_all QML_PROJECT translation_all.qmlproject GENERATE_ENTRYPOINT)

app_target_setup_os(translation_all)

# Set up a lv_LV-only target
qul_add_target(translation_lv QML_PROJECT translation_lv.qmlproject GENERATE_ENTRYPOINT)
app_target_setup_os(translation_lv)
target_compile_definitions(translation_lv PRIVATE APP_DEFAULT_UILANGUAGE="lv_LV")

if(TARGET Qul::MonotypeSpark)
    # Set up Spark target
    if (QUL_PLATFORM MATCHES "^ek-ra6m3g")
        qul_add_target(translation_spark QML_PROJECT translation_spark_ek-ra6m3g.qmlproject GENERATE_ENTRYPOINT)
    else()
        qul_add_target(translation_spark QML_PROJECT translation_spark.qmlproject GENERATE_ENTRYPOINT)
    endif()
    app_target_setup_os(translation_spark)
endif()