forked from hideakitai/Packetizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (37 loc) · 1.09 KB
/
CMakeLists.txt
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# CMakeLists for drop-in compatibility with ROS
# and a Teensy (I used 3.6)
#
# This is a subtle adjustment to hideataki's code, mostly adding CMakeLists
# so we can parse packets coming in from the Teensy
# using the same library that we use to make the
# packets in the first place.
#
# by Drew Hamilton ([email protected])
#
cmake_minimum_required(VERSION 3.0.2)
project(packetizer)
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
#roscpp
#packetizer_crc_hw
#ros_encoding
)
catkin_package(
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${catkin_INCLUDE_DIRS}
)
## Declare a C++ library
add_library(${PROJECT_NAME}
ros_packetizer.cpp
type_packer.cpp
)
# rosrun packetizer packetizer_example
add_executable(${PROJECT_NAME}_example ${CMAKE_CURRENT_SOURCE_DIR}/ROS_example/src/ros_example.cpp)
add_executable(${PROJECT_NAME}_example2 ${CMAKE_CURRENT_SOURCE_DIR}/ROS_example/src/ros_example2.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} )