Added mg_bt
This commit is contained in:
67
mg_bt/CMakeLists.txt
Normal file
67
mg_bt/CMakeLists.txt
Normal file
@ -0,0 +1,67 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(mg_bt)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
set(PACKAGE_DEPS
|
||||
rclcpp
|
||||
behaviortree_cpp
|
||||
behaviortree_ros2
|
||||
btcpp_ros2_interfaces
|
||||
tf2
|
||||
tf2_ros
|
||||
tf2_geometry_msgs
|
||||
mg_msgs
|
||||
std_msgs
|
||||
std_srvs
|
||||
)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_search_module(LIBGLM REQUIRED glm)
|
||||
|
||||
foreach(PACKAGE ${PACKAGE_DEPS})
|
||||
find_package(${PACKAGE} REQUIRED)
|
||||
endforeach()
|
||||
|
||||
set(SOURCES
|
||||
src/mg_bt.cpp
|
||||
src/mg_tree_executor.cpp
|
||||
)
|
||||
|
||||
|
||||
add_executable(mg_bt_executor ${SOURCES})
|
||||
|
||||
target_include_directories(
|
||||
mg_bt_executor
|
||||
PRIVATE
|
||||
${LIBGLM_INCLUDE_DIRS}
|
||||
include
|
||||
)
|
||||
|
||||
ament_target_dependencies(mg_bt_executor ${PACKAGE_DEPS})
|
||||
|
||||
install( TARGETS
|
||||
mg_bt_executor
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(DIRECTORY
|
||||
behavior_trees
|
||||
config
|
||||
launch
|
||||
DESTINATION share/${PROJECT_NAME}/
|
||||
)
|
||||
|
||||
target_compile_features(mg_bt_executor PUBLIC
|
||||
c_std_99
|
||||
cxx_std_17
|
||||
) # Require C99 and C++17
|
||||
|
||||
ament_package()
|
||||
Reference in New Issue
Block a user