修改 CMakeLists.txt 文件,增加 Boost 的 chrono、date_time、atomic 组件
This commit is contained in:
parent
5dddaf3199
commit
f72c744d27
@ -51,7 +51,14 @@ else()
|
||||
set(BOOST_ROOT "/opt/homebrew/Cellar/boost/1.87.0")
|
||||
set(BOOST_LIBRARYDIR "/opt/homebrew/Cellar/boost/1.87.0/lib")
|
||||
endif()
|
||||
find_package(Boost 1.69.0 REQUIRED COMPONENTS system filesystem thread)
|
||||
find_package(Boost 1.69.0 REQUIRED COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
thread
|
||||
chrono
|
||||
date_time
|
||||
atomic
|
||||
)
|
||||
|
||||
# 添加 libcurl
|
||||
find_package(CURL REQUIRED)
|
||||
@ -111,8 +118,9 @@ target_include_directories(${PROJECT_NAME}_lib
|
||||
target_link_libraries(${PROJECT_NAME}_lib
|
||||
PUBLIC
|
||||
Boost::system
|
||||
nlohmann_json::nlohmann_json # 统一目标名称
|
||||
nlohmann_json::nlohmann_json
|
||||
CURL::libcurl
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
# 创建主可执行文件
|
||||
@ -165,12 +173,11 @@ configure_file(${CMAKE_SOURCE_DIR}/config/airport_bounds.json ${CMAKE_BINARY_DIR
|
||||
configure_file(${CMAKE_SOURCE_DIR}/config/unmanned_vehicles.json ${CMAKE_BINARY_DIR}/config/unmanned_vehicles.json COPYONLY)
|
||||
|
||||
# 查找 Threads 包
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(NOT APPLE)
|
||||
target_link_libraries(collision_avoidance
|
||||
PRIVATE
|
||||
${PROJECT_NAME}_lib
|
||||
Threads::Threads
|
||||
)
|
||||
endif()
|
||||
Loading…
Reference in New Issue
Block a user