# mb_hmi模块的CMakeLists.txt

# 创建mb_hmi库
add_library(mb_hmi STATIC
    mb_command.c
    mb_server.c
    mb_interface.c
)

# 设置包含目录
target_include_directories(mb_hmi
    PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}
)

# 链接依赖库
target_link_libraries(mb_hmi
    PUBLIC
        nanomodbus
        # 根据需要添加其他依赖
)

# 如果etk_os_adapt可用，链接它
if(TARGET etk_os_adapt)
    target_link_libraries(mb_hmi PUBLIC etk_os_adapt)
endif()

# 根据系统类型设置编译选项
if(DEFINED SYSTEM_TYPE)
    message(STATUS "[mb_hmi] System type: ${SYSTEM_TYPE}")
endif()