forked from robotology/gazebo-yarp-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (41 loc) · 1.83 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright (C) 2007-2015 Istituto Italiano di Tecnologia ADVR & iCub Facility & RBCS Department
# Authors: Enrico Mingo, Alessio Rocchi, Mirko Ferrati, Silvio Traversaro, Alessandro Settimi and Francesco Romano
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
cmake_minimum_required(VERSION 2.8.7)
PROJECT(GazeboYarpPlugins)
find_package(YARP 2.3.64.13 REQUIRED)
# Finding dependencies
find_package(Boost REQUIRED serialization system)
find_package(Protobuf REQUIRED)
find_package(Gazebo REQUIRED)
find_package(SDFormat REQUIRED)
find_package(OGRE QUIET)
# Add Gazebo CXX flags, to support Gazebo 6 reckless dependency on C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}")
# add local cmake scripts
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
#used for dir suffixes
include(GNUInstallDirs)
if (CMAKE_VERSION LESS 3.0)
# hack: by default this would be 'lib/x86_64-linux-gnu' on linux
set(CMAKE_INSTALL_LIBDIR lib)
endif()
OPTION(GAZEBO_YARP_PLUGINS_ENABLE_RPATH "Enable installation with RPATH" TRUE)
include(AddInstallRPATHSupport)
add_install_rpath_support(BIN_DIRS ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}
LIB_DIRS ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
DEPENDS GAZEBO_YARP_PLUGINS_ENABLE_RPATH
USE_LINK_PATH)
# Define (depending on CMAKE_BUILD_TYPE) the DEBUG macro
include(AddDebugMacro)
# Enable all possible warning if CMAKE_BUILD_TYPE is debug
include(AddDebugWarnings)
#this is required for all plugins
link_directories(${GAZEBO_LIBRARY_DIRS} ${SDFORMAT_LIBRARY_DIRS} ${PROTOBUF_LIBRARY_DIRS})
#build common libraries first
add_subdirectory(libraries)
#build RPC libraries
add_subdirectory(thrift)
#now build plugins
add_subdirectory(plugins)
include(AddUninstallTarget)