AutowareV2X/CMakeLists.txt

72 lines
1.9 KiB
CMake
Raw Normal View History

2021-10-27 21:56:21 +00:00
cmake_minimum_required(VERSION 3.5)
project(autoware_v2x)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake_auto REQUIRED)
set(VANETZA_INSTALL ON)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
find_package(Vanetza REQUIRED)
find_package(GeographicLib 1.37 REQUIRED)
find_package(Boost COMPONENTS thread program_options REQUIRED)
find_package(etsi_its_cam_ts_coding REQUIRED)
find_package(etsi_its_cam_ts_conversion REQUIRED)
2021-10-27 21:56:21 +00:00
ament_auto_find_build_dependencies()
find_package(std_msgs REQUIRED)
find_package(Protobuf REQUIRED)
2021-10-27 21:56:21 +00:00
include_directories(
include
${CMAKE_CURRENT_BINARY_DIR}/src
2021-10-27 21:56:21 +00:00
)
ament_auto_add_library(autoware_v2x SHARED
2021-11-01 07:26:45 +00:00
src/v2x_node.cpp
2021-11-10 08:13:32 +00:00
src/v2x_app.cpp
2021-10-27 21:56:21 +00:00
src/application.cpp
src/cpm_application.cpp
src/cam_application.cpp
src/cube_evk_link.cpp
2021-10-27 21:56:21 +00:00
src/ethernet_device.cpp
src/link_layer.cpp
src/raw_socket_link.cpp
src/router_context.cpp
src/dcc_passthrough.cpp
src/time_trigger.cpp
src/positioning.cpp
src/security.cpp
)
protobuf_generate(TARGET autoware_v2x PROTOS src/cube_evk_radio.proto)
target_link_libraries(autoware_v2x Vanetza::vanetza ${GeographicLib_LIBRARIES} Boost::thread Boost::program_options sqlite3 etsi_its_cam_ts_coding::etsi_its_cam_ts_coding etsi_its_cam_ts_conversion::etsi_its_cam_ts_conversion protobuf::libprotobuf)
2021-10-27 21:56:21 +00:00
rclcpp_components_register_node(autoware_v2x
PLUGIN "v2x::V2XNode"
EXECUTABLE autoware_v2x_node
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
ament_auto_package(INSTALL_TO_SHARE
launch
config
)