cmake_minimum_required(VERSION 3.0.2)
project(device_manager)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  common
  roscpp
  std_msgs
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)




###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
  #INCLUDE_DIRS include
  CATKIN_DEPENDS common roscpp std_msgs
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

#message(STATUS " ${CMAKE_HOST_SYSTEM_PROCESSOR}")
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common/lib/${CMAKE_HOST_SYSTEM_PROCESSOR})

add_executable(device_manager_node src/device_manager_node.cpp)
add_dependencies(device_manager_node ${catkin_EXPORTED_TARGETS} common_gencpp)
target_link_libraries(device_manager_node ${catkin_LIBRARIES} stream)

