From: Konstantinos Chatzilygeroudis Date: Tue, 7 Mar 2017 09:55:01 +0000 (+0100) Subject: Better CMake X-Git-Tag: 0.1.0~13^2 X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=939e1f37b882358a05ff73c8dbdcc592c1f89e9e;p=roboticsgroup_upatras_gazebo_plugins.git Better CMake --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 79f45f4..557ee57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,24 +1,23 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) project(roboticsgroup_gazebo_plugins) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS - roscpp +find_package(catkin REQUIRED COMPONENTS + roscpp gazebo_ros control_toolbox ) # Depend on system install of Gazebo find_package(gazebo REQUIRED) -if(${GAZEBO_MAJOR_VERSION} GREATER "5") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") -endif() +# Gazebo cxx flags should have all the required C++ flags +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}") find_package(Boost REQUIRED) catkin_package( - DEPENDS - roscpp + DEPENDS + roscpp gazebo_ros control_toolbox ) @@ -31,4 +30,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}) -