30 Star 206 Fork 42

TARS_Go-Embedded/UIML

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
RigoLigo 提交于 2023-12-21 17:16 +08:00 . Fix: 压制部分警告
cmake_minimum_required(VERSION 3.21)
project(UIML)
if(MSVC)
add_compile_options("/utf-8")
endif()
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 20)
# 子模块添加
add_subdirectory(tools)
add_subdirectory(services)
add_subdirectory(softbus)
add_subdirectory(system)
# Embedded Template Library
add_subdirectory(lib/etl)
# UIML 静态库部分
add_library(uiml_static OBJECT
${TOOLS_MODULE_SRC}
${SOFTBUS_MODULE_SRC}
${SYSTEM_MODULE_SRC}
${SERVICES_MODULE_SRC}
)
# 链接祖传的AHRS静态库
# 谁能把这玩意搞掉啊求求了
target_link_libraries(uiml_static PRIVATE ${CMAKE_CURRENT_LIST_DIR}/lib/AHRS.lib)
target_link_libraries(uiml_static PUBLIC etl::etl) # 链接ETL
# 包含目录
target_include_directories(uiml_static PUBLIC
${TOOLS_MODULE_INCL}
${SOFTBUS_MODULE_INCL}
${SYSTEM_MODULE_INCL}
${CMAKE_CURRENT_SOURCE_DIR}/inc
)
# 激发所有警告
# FIXME: 由于UIML Softbus在C API中使用的部分宏会导致报出missing brace警告(如按手册编写无实际影响)
# 故取消该警告,但留一个FIXME供检索
target_compile_options(uiml_static PRIVATE -Wall -Wno-missing-braces)
if(PROJECT_IS_TOP_LEVEL)
add_subdirectory(test)
endif()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/tarsgo-embedded/UIML.git
git@gitee.com:tarsgo-embedded/UIML.git
tarsgo-embedded
UIML
UIML
master

搜索帮助