1
0
Fork 0
ORB-SLAM3-UESTC/Workspace/Application/IMUDriver/CMakeLists.txt

22 lines
534 B
CMake
Raw Normal View History

2023-12-01 01:16:53 +08:00
# 声明要求的 cmake 最低版本
cmake_minimum_required(VERSION 2.8)
# 声明一个 cmake 工程
project(imu)
# 设置编译模式
set(CMAKE_BUILD_TYPE "Debug")
# 查找 Boost 库
find_package(Boost REQUIRED)
# 语法add_executable( 程序名 源代码文件
add_executable(imu main.cpp IMUReader.cpp)
target_include_directories(imu PRIVATE ${CMAKE_SOURCE_DIR})
# 添加线程库
find_package(Threads REQUIRED)
target_link_libraries(imu PRIVATE Threads::Threads)
target_link_libraries(imu ${Boost_LIBRARIES} pthread)