Commit 3dc06f50 authored by Nicolae Rosia's avatar Nicolae Rosia Committed by Lorenz Meier
Browse files

CMakeLists.txt: Use GAZEBO_VERSION instead of pkg_check_modules



gazebo-config.cmake sets GAZEBO_VERSION.
Use it to compare version.
Signed-off-by: default avatarNicolae Rosia <nicolae.rosia@gmail.com>
parent 5d2ea50f
...@@ -3,11 +3,14 @@ cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) ...@@ -3,11 +3,14 @@ cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
find_package( PkgConfig REQUIRED) find_package( PkgConfig REQUIRED)
find_package(OpenCV REQUIRED) find_package(OpenCV REQUIRED)
find_package(gazebo REQUIRED) find_package(gazebo REQUIRED)
if(${GAZEBO_VERSION} VERSION_LESS "6.0")
message(FATAL_ERROR "You need at least Gazebo 6.0. Your version: ${GAZEBO_VERSION}")
endif()
find_package(Eigen3 REQUIRED) find_package(Eigen3 REQUIRED)
pkg_check_modules( protobuf REQUIRED protobuf ) pkg_check_modules( protobuf REQUIRED protobuf )
FIND_PACKAGE( Boost 1.40 COMPONENTS system thread REQUIRED ) FIND_PACKAGE( Boost 1.40 COMPONENTS system thread REQUIRED )
pkg_check_modules(GAZEBO REQUIRED gazebo>=6.0)
pkg_check_modules(SDF REQUIRED sdformat) pkg_check_modules(SDF REQUIRED sdformat)
add_definitions(-std=c++11) add_definitions(-std=c++11)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment