修改 CMakeLists.txt 文件,增加 Boost 的 chrono、date_time、atomic 组件

This commit is contained in:
Tian jianyong 2025-02-06 17:26:30 +08:00
parent 5dddaf3199
commit f72c744d27

View File

@ -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()