cmake_minimum_required (VERSION 3.15)

project(cpp_zw_text VERSION 0.0.1 LANGUAGES C CXX ASM ASM_MASM)

find_package(Qul)

qul_add_target(cpp_zw_text mydatatest.cpp qul_run.cpp)

#qul_add_target(cpp_zw_text STATIC_LIBRARY mydatatest.cpp  qul_run.cpp)

qul_target_generate_interfaces(cpp_zw_text mydatatest.h qul_run.h)


qul_target_qml_sources(cpp_zw_text cpp_zw_text.qml TextView20.qml)

qul_add_qml_module(cpp_zw_text_module
    URI MyModule
    QML_FILES
        Models/MainModel.qml
    OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/modules
    )

target_link_libraries(cpp_zw_text PRIVATE cpp_zw_text_module Qul::Shapes)


set(FONT_FILES
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Black.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Bold.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Light.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Medium.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Regular.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/HarmonyOS_Sans_SC_Thin.ttf"
    "${CMAKE_CURRENT_SOURCE_DIR}/fonts/ZiTiQuanXinYiLOGOTi-2.ttf"
)
set_property(TARGET cpp_zw_text APPEND PROPERTY QUL_FONT_FILES "${FONT_FILES}")
set_target_properties(cpp_zw_text PROPERTIES QUL_DEFAULT_FONT_FAMILY "HarmonyOS Sans SC")

app_target_setup_os(cpp_zw_text)

app_target_default_entrypoint(cpp_zw_text cpp_zw_text)

