From 9df57e915d23d5bb39f9791eb5a161a2176161b6 Mon Sep 17 00:00:00 2001 From: Stefan Kohlbrecher Date: Wed, 25 May 2016 16:02:40 +0200 Subject: [PATCH] Move catkin_package macro so it is called before targets are defined. Fixes plugins not getting found when doing isolated builds --- CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e3f7c2..58b3940 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,13 @@ find_package(catkin REQUIRED COMPONENTS find_package(gazebo REQUIRED) find_package(Boost REQUIRED) +catkin_package( + DEPENDS + roscpp + gazebo_ros + control_toolbox +) + link_directories(${GAZEBO_LIBRARY_DIRS}) include_directories(${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} include) @@ -21,9 +28,3 @@ target_link_libraries(roboticsgroup_gazebo_mimic_joint_plugin ${catkin_LIBRARIES add_library(roboticsgroup_gazebo_disable_link_plugin src/disable_link_plugin.cpp) target_link_libraries(roboticsgroup_gazebo_disable_link_plugin ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES}) -catkin_package( - DEPENDS - roscpp - gazebo_ros - control_toolbox -) \ No newline at end of file -- 2.12.0