cmake_minimum_required(VERSION 2.8.3)
project(rosinljubljana)

## 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
              roscpp
              rospy
              std_msgs
              sensor_msgs
              message_generation
              tf
              camera_info_manager
              image_transport
              cv_bridge
              dynamic_reconfigure
              gazebo_plugins
              gazebo_ros
              webots_ros
              gazebo_ros_control
              geometry_msgs
              nav_msgs
)

add_compile_options(-std=c++11)

############################
##   CGAL                ##
############################

find_package(CGAL)

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

## Generate added messages and services with any dependencies listed here
  generate_messages(
    DEPENDENCIES
    std_msgs
    sensor_msgs
  )

###################################
## 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 you 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
   LIBRARIES rosinljubljana
   CATKIN_DEPENDS camera_info_manager image_transport roscpp rospy std_msgs sensor_msgs message_runtime tf
   DEPENDS system_lib
)

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

include_directories(
  ${catkin_INCLUDE_DIRS}
  include
)

add_executable( camera_webots src/camera_webots.cpp src/rosinljubljana_objects.cpp)

target_link_libraries( camera_webots
 ${catkin_LIBRARIES}
 CGAL::CGAL
)

add_executable( robot src/robot.cpp src/rosinljubljana_objects.cpp)

target_link_libraries( robot
 ${catkin_LIBRARIES}
 CGAL::CGAL
)

add_executable( robot_webots src/robot_webots.cpp src/rosinljubljana_objects.cpp)

target_link_libraries( robot_webots
 ${catkin_LIBRARIES}
 CGAL::CGAL
)

add_executable(simple_navigation_goal src/simple_navigation_goal.cpp)
target_link_libraries(simple_navigation_goal ${catkin_LIBRARIES})
