2017-01-10 13:14:41 -04:00
|
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
|
|
project(xbee_ros_node)
|
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++11")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set (BOOST_INCLUDEDIR "/usr/include")
|
|
|
|
|
|
|
|
## Find catkin macros and libraries
|
|
|
|
find_package(catkin REQUIRED COMPONENTS
|
|
|
|
roscpp
|
|
|
|
std_msgs
|
2017-04-11 10:27:16 -03:00
|
|
|
mavros_msgs
|
2017-01-10 13:14:41 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
## System dependencies are found with CMake's conventions
|
|
|
|
find_package(Boost REQUIRED COMPONENTS
|
|
|
|
system)
|
|
|
|
|
|
|
|
################################################
|
|
|
|
## Declare ROS messages, services and actions ##
|
|
|
|
################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
################################################
|
|
|
|
## Declare ROS dynamic reconfigure parameters ##
|
|
|
|
################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###################################
|
|
|
|
## catkin specific configuration ##
|
|
|
|
###################################
|
|
|
|
|
|
|
|
|
|
|
|
catkin_package(
|
|
|
|
INCLUDE_DIRS include
|
|
|
|
# LIBRARIES xbee_ros_node
|
2017-04-11 10:27:16 -03:00
|
|
|
CATKIN_DEPENDS roscpp std_msgs mavros_msgs
|
2017-01-10 13:14:41 -04:00
|
|
|
# DEPENDS system_lib
|
|
|
|
)
|
|
|
|
|
|
|
|
###########
|
|
|
|
## Build ##
|
|
|
|
###########
|
2017-09-20 13:57:20 -03:00
|
|
|
## Add definitions
|
|
|
|
add_definitions(
|
|
|
|
-DDATABASE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/Resources/database.xml"
|
|
|
|
-DXBEE_CONFIG_PATH="${CMAKE_CURRENT_SOURCE_DIR}/Resources/XBee_Config.xml"
|
|
|
|
)
|
2017-01-10 13:14:41 -04:00
|
|
|
|
|
|
|
## Specify additional locations of header files
|
|
|
|
include_directories(
|
|
|
|
include ${xbee_ros_node_INCLUDE_DIRS}
|
|
|
|
${catkin_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-17 15:20:52 -04:00
|
|
|
add_executable(xbee_mav src/Xbee.cpp src/XBeeFrame.cpp src/SerialDevice.cpp src/CommunicationManager.cpp src/PacketsHandler)
|
|
|
|
target_link_libraries(xbee_mav ${catkin_LIBRARIES})
|
|
|
|
|
2017-04-20 17:36:36 -03:00
|
|
|
add_executable(xbee_config src/main.cpp src/XBeeModule.cpp src/XMLConfigParser.cpp)
|
|
|
|
target_link_libraries(xbee_config ${catkin_LIBRARIES})
|
2017-01-10 13:14:41 -04:00
|
|
|
|
|
|
|
#add_executable(test_controller src/TestController.cpp)
|
|
|
|
#target_link_libraries(test_controller ${catkin_LIBRARIES})
|
|
|
|
|
2017-02-17 17:41:50 -04:00
|
|
|
|
2017-02-17 15:20:52 -04:00
|
|
|
add_executable(test_buzz src/TestBuzz.cpp)
|
|
|
|
target_link_libraries(test_buzz ${catkin_LIBRARIES})
|
2017-01-10 13:14:41 -04:00
|
|
|
|
|
|
|
#############
|
|
|
|
## Install ##
|
|
|
|
#############
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#############
|
|
|
|
## Testing ##
|
|
|
|
#############
|
|
|
|
|