diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ad90c9b4d09f17e5b48b28a386d0d8714402d83..5e6cf165739610e5db2ab43e0e04e154b6eaacec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(iri_ros_tools) ## 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) +find_package(catkin REQUIRED COMPONENTS roscpp) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) @@ -88,16 +88,19 @@ catkin_package( ## Specify additional locations of header files ## Your package locations should be listed before other locations include_directories(include) +include_directories(${catkin_INCLUDE_DIRS}) ## Declare a cpp library # add_library(iri_ros_tool # src/${PROJECT_NAME}/iri_ros_tool.cpp # ) add_library(${PROJECT_NAME} src/timeout.cpp src/watchdog.cpp) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) add_library(modules include/${PROJECT_NAME}/module_common.h include/${PROJECT_NAME}/module.h include/${PROJECT_NAME}/module_service.h include/${PROJECT_NAME}/module_action.h include/${PROJECT_NAME}/module_exceptions.h include/${PROJECT_NAME}/module_dyn_reconf.h) set_target_properties(modules PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(modules ${PROJECT_NAME}) +target_link_libraries(modules ${catkin_LIBRARIES}) ## Declare a cpp executable