ORB-SLAM3-Test/Workspace/Application/IMUDriver/CMakeLists.txt

22 lines
534 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 声明要求的 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)