CMakeLists.txt 2.33 KB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright 2011, Thomas Moulard, Olivier Stasse, JRL, CNRS/AIST
#
# This file is part of sot-hrp2.
# sot-hrp2 is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# sot-hrp2 is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Lesser Public License for more details.  You should have
# received a copy of the GNU Lesser General Public License along with
# sot-hrp2. If not, see <http://www.gnu.org/licenses/>.

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
20
INCLUDE(cmake/eigen.cmake)
Thomas Moulard's avatar
Thomas Moulard committed
21
INCLUDE(cmake/lapack.cmake)
22
INCLUDE(cmake/ros.cmake)
olivier stasse's avatar
olivier stasse committed
23

Guilhem Saurel's avatar
Guilhem Saurel committed
24
SET(PROJECT_NAMESPACE stack-of-tasks)
Thomas Moulard's avatar
Thomas Moulard committed
25
26
SET(PROJECT_NAME sot-hrp2)
SET(PROJECT_DESCRIPTION "dynamic-graph package for HRP-2 robot")
Guilhem Saurel's avatar
Guilhem Saurel committed
27
SET(PROJECT_URL "http://github.com/${PROJECT_NAMESPACE}/${PROJECT_NAME}")
Thomas Moulard's avatar
Thomas Moulard committed
28
29

SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
Guilhem Saurel's avatar
Guilhem Saurel committed
30
SET(PROJECT_SUFFIX "-v3")
Thomas Moulard's avatar
Thomas Moulard committed
31

32
SET(CXX_DISABLE_WERROR True)
Thomas Moulard's avatar
Thomas Moulard committed
33
34
35
36
37
38
39
40
41
42
43

SET(PKG_CONFIG_ADDITIONAL_VARIABLES
  ${PKG_CONFIG_ADDITIONAL_VARIABLES}
  plugindirname
  plugindir
  )

SETUP_PROJECT()

# Search for dependencies.

44
ADD_REQUIRED_DEPENDENCY("pinocchio")
45
ADD_OPTIONAL_DEPENDENCY("hrp2-10-optimized >= 1.0.1")
Thomas Moulard's avatar
Thomas Moulard committed
46

47
48
ADD_OPTIONAL_DEPENDENCY("hrp2-10 >= 1.0.1-10")
ADD_OPTIONAL_DEPENDENCY("hrp2-14 >= 1.8-6")
Thomas Moulard's avatar
Thomas Moulard committed
49

Rohan Budhiraja's avatar
Rohan Budhiraja committed
50
51
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
ADD_REQUIRED_DEPENDENCY("sot-core >= 3.0.0")
52
ADD_REQUIRED_DEPENDENCY("sot-dynamic-pinocchio >= 3.1")
Rohan Budhiraja's avatar
Rohan Budhiraja committed
53
ADD_REQUIRED_DEPENDENCY("dynamic-graph-python >= 3.0.0")
Thomas Moulard's avatar
Thomas Moulard committed
54

55
ADD_REQUIRED_DEPENDENCY("dynamic_graph_bridge_msgs")
Rohan Budhiraja's avatar
Rohan Budhiraja committed
56
ADD_REQUIRED_DEPENDENCY("dynamic_graph_bridge >= 3.0")
Thomas Moulard's avatar
Thomas Moulard committed
57
58
# Search for dependencies.
# Boost
59
SET(BOOST_COMPONENTS filesystem system thread)
Thomas Moulard's avatar
Thomas Moulard committed
60
SEARCH_FOR_BOOST()
61
SEARCH_FOR_EIGEN()
Thomas Moulard's avatar
Thomas Moulard committed
62

63
64
# Handle rpath necessary to handle ROS multiplace packages
# libraries inclusion
65
SET(CMAKE_INSTALL_LIBDIR lib)
66
67
SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
68
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
69
70
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

Thomas Moulard's avatar
Thomas Moulard committed
71
72
73
74
75
# Add subdirectories.
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)

SETUP_PROJECT_FINALIZE()