cmake_minimum_required(VERSION 2.8.3)
project(YOURROBOT_gazebo_plugins)
find_package(catkin REQUIRED COMPONENTS
  gazebo_ros
)
# Depend on system install of Gazebo
find_package(gazebo REQUIRED)
include_directories(include ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ${SDFormat_INCLUDE_DIRS})
# Build whatever you need here
add_library(...) # TODO
catkin_package(
    DEPENDS
      gazebo_ros
    CATKIN_DEPENDS
    INCLUDE_DIRS
    LIBRARIES
)<build_depend>gazebo_ros</build_depend> <run_depend>gazebo_ros</run_depend>
原文:http://blog.csdn.net/dxuehui/article/details/46591781