|
| 1 | +cmake_minimum_required(VERSION 3.10.0) |
| 2 | +project(fsds_ros2_bridge) |
| 3 | + |
| 4 | +# set this to path to AirSim root folder if you want your catkin workspace in a custom directory |
| 5 | +set(AIRSIM_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../AirSim/) |
| 6 | + |
| 7 | +add_subdirectory("${AIRSIM_ROOT}/cmake/rpclib_wrapper" rpclib_wrapper) |
| 8 | +add_subdirectory("${AIRSIM_ROOT}/cmake/AirLib" AirLib) |
| 9 | + |
| 10 | +set(CMAKE_CXX_STANDARD 11) |
| 11 | +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread") |
| 12 | +set(CXX_EXP_LIB "-nostdinc++ -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -nodefaultlibs |
| 13 | +-l/usr/lib/x86_64-linux-gnu/libc++.so -l/usr/lib/x86_64-linux-gnu/libc++abi.so |
| 14 | +-lm -lc -lgcc_s -lgcc |
| 15 | +-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel") |
| 16 | + |
| 17 | +set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/rpclib-2.2.1/include") |
| 18 | +set(RPC_LIB rpc) # name of .a file with lib prefix |
| 19 | +message(STATUS "found RPC_LIB_INCLUDES=${RPC_LIB_INCLUDES}") |
| 20 | + |
| 21 | +# find dependencies |
| 22 | +find_package(ament_cmake_auto REQUIRED) |
| 23 | +ament_auto_find_build_dependencies() |
| 24 | + |
| 25 | +find_package( OpenCV REQUIRED ) |
| 26 | +include_directories( ${OpenCV_INCLUDE_DIRS} ) |
| 27 | + |
| 28 | +include_directories( |
| 29 | + include |
| 30 | + ${AIRSIM_ROOT}/AirLib/deps/eigen3 |
| 31 | + ${AIRSIM_ROOT}/AirLib/include |
| 32 | + ${RPC_LIB_INCLUDES} |
| 33 | +) |
| 34 | + |
| 35 | +find_package( PkgConfig REQUIRED) |
| 36 | +pkg_check_modules( libcurl REQUIRED libcurl ) |
| 37 | + |
| 38 | +ament_auto_add_library(airsim_ros src/airsim_ros_wrapper.cpp) |
| 39 | +target_link_libraries(airsim_ros yaml-cpp AirLib) |
| 40 | + |
| 41 | +ament_auto_add_executable(fsds_ros2_bridge src/fsds_ros2_bridge.cpp) |
| 42 | +target_link_libraries(fsds_ros2_bridge airsim_ros AirLib ${libcurl_LIBRARIES}) |
| 43 | + |
| 44 | +ament_auto_add_executable(fsds_ros2_bridge_camera src/fsds_ros2_bridge_camera.cpp) |
| 45 | +target_link_libraries(fsds_ros2_bridge_camera AirLib ${OpenCV_LIBS}) |
| 46 | + |
| 47 | +# install(TARGETS |
| 48 | +# #list of shared libraries |
| 49 | +# airsim_ros |
| 50 | +# # pd_position_controller_simple |
| 51 | +# ARCHIVE DESTINATION lib/${PROJECT_NAME}/ |
| 52 | +# LIBRARY DESTINATION lib/${PROJECT_NAME}/ |
| 53 | +# ) |
| 54 | + |
| 55 | +# install(FILES |
| 56 | +# #list of necessary files (xml...) |
| 57 | +# README.md |
| 58 | +# # settings.json |
| 59 | +# # nodelet_plugins.xml |
| 60 | +# DESTINATION share/${PROJECT_NAME}/ |
| 61 | +# ) |
| 62 | + |
| 63 | +ament_auto_package(INSTALL_TO_SHARE launch) |
| 64 | + |
0 commit comments