mirror of
https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
synced 2025-09-15 13:08:35 +08:00
78 lines
2.6 KiB
CMake
78 lines
2.6 KiB
CMake
################################################################################
|
|
# CMake
|
|
################################################################################
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(turtlebot3_gazebo)
|
|
|
|
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
|
|
|
################################################################################
|
|
# Packages
|
|
################################################################################
|
|
find_package(catkin REQUIRED COMPONENTS
|
|
roscpp
|
|
std_msgs
|
|
sensor_msgs
|
|
geometry_msgs
|
|
nav_msgs
|
|
tf
|
|
gazebo_ros
|
|
)
|
|
|
|
find_package(gazebo REQUIRED)
|
|
|
|
################################################################################
|
|
# Declare ROS messages, services and actions
|
|
################################################################################
|
|
|
|
################################################################################
|
|
# Declare ROS dynamic reconfigure parameters
|
|
################################################################################
|
|
|
|
################################################################################
|
|
# Catkin specific configuration
|
|
################################################################################
|
|
catkin_package(
|
|
INCLUDE_DIRS include
|
|
CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs nav_msgs tf gazebo_ros
|
|
)
|
|
|
|
################################################################################
|
|
# Build
|
|
################################################################################
|
|
link_directories(${GAZEBO_LIBRARY_DIRS})
|
|
|
|
include_directories(
|
|
include
|
|
${catkin_INCLUDE_DIRS}
|
|
${Boost_INCLUDE_DIR}
|
|
${GAZEBO_INCLUDE_DIRS}
|
|
)
|
|
|
|
add_executable(turtlebot3_drive src/turtlebot3_drive.cpp)
|
|
add_dependencies(turtlebot3_drive ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
|
target_link_libraries(turtlebot3_drive ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES})
|
|
|
|
################################################################################
|
|
# Install
|
|
################################################################################
|
|
install(TARGETS turtlebot3_drive
|
|
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
)
|
|
|
|
install(DIRECTORY include/${PROJECT_NAME}/
|
|
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
)
|
|
|
|
install(DIRECTORY launch rviz worlds
|
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
)
|
|
|
|
install(DIRECTORY worlds models
|
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
)
|
|
|
|
################################################################################
|
|
# Test
|
|
################################################################################
|