mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 13:03:33 +08:00
Dependencies update for linux/cmake
This commit is contained in:
@@ -11,6 +11,12 @@ project(libuavcan_linux)
|
|||||||
#
|
#
|
||||||
install(DIRECTORY include/uavcan_linux DESTINATION include)
|
install(DIRECTORY include/uavcan_linux DESTINATION include)
|
||||||
|
|
||||||
|
#
|
||||||
|
# System dependecies
|
||||||
|
#
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Finding libuavcan - it will be a target if we're running from the top-level CMakeLists.txt,
|
# Finding libuavcan - it will be a target if we're running from the top-level CMakeLists.txt,
|
||||||
# otherwise try to find it in the system directories.
|
# otherwise try to find it in the system directories.
|
||||||
@@ -36,27 +42,27 @@ set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -std=c++0x") # GCC or Clang
|
|||||||
# These aren't installed, an average library user should not care about them.
|
# These aren't installed, an average library user should not care about them.
|
||||||
#
|
#
|
||||||
add_executable(test_clock apps/test_clock.cpp)
|
add_executable(test_clock apps/test_clock.cpp)
|
||||||
target_link_libraries(test_clock ${UAVCAN_LIB} rt)
|
target_link_libraries(test_clock ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
add_executable(test_socket apps/test_socket.cpp)
|
add_executable(test_socket apps/test_socket.cpp)
|
||||||
target_link_libraries(test_socket ${UAVCAN_LIB} rt)
|
target_link_libraries(test_socket ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
add_executable(test_node apps/test_node.cpp)
|
add_executable(test_node apps/test_node.cpp)
|
||||||
target_link_libraries(test_node ${UAVCAN_LIB} rt)
|
target_link_libraries(test_node ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
add_executable(test_time_sync apps/test_time_sync.cpp)
|
add_executable(test_time_sync apps/test_time_sync.cpp)
|
||||||
target_link_libraries(test_time_sync ${UAVCAN_LIB} rt)
|
target_link_libraries(test_time_sync ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tools
|
# Tools
|
||||||
# Someday they will be replaced with Python scripts (pyuavcan is not finished at the moment)
|
# Someday they will be replaced with Python scripts (pyuavcan is not finished at the moment)
|
||||||
#
|
#
|
||||||
add_executable(uavcan_status_monitor apps/uavcan_status_monitor.cpp)
|
add_executable(uavcan_status_monitor apps/uavcan_status_monitor.cpp)
|
||||||
target_link_libraries(uavcan_status_monitor ${UAVCAN_LIB} rt)
|
target_link_libraries(uavcan_status_monitor ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
add_executable(uavcan_nodetool apps/uavcan_nodetool.cpp)
|
add_executable(uavcan_nodetool apps/uavcan_nodetool.cpp)
|
||||||
target_link_libraries(uavcan_nodetool ${UAVCAN_LIB} rt)
|
target_link_libraries(uavcan_nodetool ${UAVCAN_LIB} rt ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
install(TARGETS uavcan_status_monitor
|
install(TARGETS uavcan_status_monitor
|
||||||
uavcan_nodetool
|
uavcan_nodetool
|
||||||
RUNTIME DESTINATION bin)
|
RUNTIME DESTINATION bin)
|
||||||
Reference in New Issue
Block a user