CMakeLists.txt 1.15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.5)
project(mm_controller)

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


#Dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(lifecycle_msgs REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
find_package(mm_controller_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)

include_directories(
 include
)

# Utils library
add_library(mm-utilscpp
 src/mm_utils.cpp
)
levi's avatar
levi committed
31
32
33
34
ament_target_dependencies(mm-utilscpp 
  "rclcpp_lifecycle"
  mm_controller_interfaces
)
35
36
37
38
39
40
41
42
43



#Executeable dependencies
add_executable(mm-controller
  src/standalone_node.cpp
  src/mm_node.cpp
  src/mm_api.c
)
levi's avatar
levi committed
44
target_link_libraries(mm-controller mm-utilscpp)
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ament_target_dependencies(mm-controller
  "rclcpp"
  "rclcpp_lifecycle"
  mm_controller_interfaces
  "geometry_msgs"
)
#Build
install(TARGETS
  mm-controller
  DESTINATION lib/${PROJECT_NAME}) 

install(DIRECTORY launch config
  DESTINATION share/${PROJECT_NAME})

ament_package()