clangTools 使用教程
编译状态 build status
支持
如果有任何需要,可以联系我:
If you need anything, please contact me :
支持功能
Base64, ConfigTool, http, JSON, logger, memory_share, openssl, Pipe, poll_tool, Popen, SHA1, socket, subprocess, thread_pool, xml i2c_tool libusb_1_tool opencv_tool Hzk_tool plthook(here) BMP-C(here) littlefs(here)
i2c_tool
为 Linux
接口,用于Linux
以及嵌入式设备
。需要添加参数 -DENABLE_I2C=ON
开启。
spi_tool
为 Linux
接口,用于Linux
以及嵌入式设备
。需要添加参数 -DENABLE_SPI=ON
开启。
引入方式
# 添加 clangTools 模块
add_subdirectory(clangTools)
# 设置模块目录
set(libTools_DIR "${CMAKE_CURRENT_SOURCE_DIR}/clangTools")
# 引入 clangTools 模块变量
include(clangTools/libTools.cmake)
# 设置 Windows 下使用 MT 模式(非MD模式)
include(clangTools/cmake/MSVC.cmake)
# 加入头文件目录
include_directories(${libTools_INCLUDE_DIR})
# 链接 clangTools 模块变量 : ${libTools_LIBRARIES}
option(ENABLE_FILENAME "option for FILENAME" ON)
if (ENABLE_FILENAME)
#重新定义当前目标的源文件的 __FILENAME__ 宏
redefine_file_macro(目标)
endif ()
bazel 支持
本项目部分支持 bazel
。
demo
clock oled
编译树莓派 时钟 OLED 程序可以使用以下参数:
cmake -DENABLE_CURL=ON -DENABLE_OPENCV=ON -DENABLE_HZK=ON -DENABLE_I2C=ON -DENABLE_SPI=ON -DENABLE_OLED=ON -DENABLE_FREETYPE=ON -DENABLE_ICONV=ON -DENABLE_OLED_TOOL=ON <cmake-source-dir>
make clock_oled
将会在 ssd1306 oled (128x64)
屏幕上显示日期
、温度
、天气
、时间
、IP地址
。
致谢
非常感谢 JetBrains
为本项目提供开源项目授权。
Thank you JetBrains
for providing open source project authorization for this project.