CMakeLists.txt 2.63 KB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
1
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST
Francois Bleibel's avatar
Francois Bleibel committed
2
#
3
4
# This file is part of sot-dynamic-pinocchio.
# sot-dynamic-pinocchio is free software: you can redistribute it and/or
Thomas Moulard's avatar
Thomas Moulard committed
5
6
7
# 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.
Francois Bleibel's avatar
Francois Bleibel committed
8
#
9
# sot-dynamic-pinocchio is distributed in the hope that it will be useful, but
Thomas Moulard's avatar
Thomas Moulard committed
10
11
12
13
# 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
14
# sot-dynamic-pinocchio. If not, see <http://www.gnu.org/licenses/>.
Francois Bleibel's avatar
Francois Bleibel committed
15
16
17

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

Thomas Moulard's avatar
Thomas Moulard committed
18
19
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/cpack.cmake)
23
INCLUDE(cmake/python.cmake)
Francois Bleibel's avatar
Francois Bleibel committed
24

25
SET(PROJECT_NAME sot-dynamic-pinocchio)
26

27
SET(PROJECT_DESCRIPTION "pinocchio bindings for dynamic-graph.")
28
SET(PROJECT_URL "https://github.com/stack-of-tasks/sot-dynamic-pinocchio/")
Francois Bleibel's avatar
Francois Bleibel committed
29

Thomas Moulard's avatar
Thomas Moulard committed
30
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
31
SET(DOXYGEN_USE_MATHJAX YES)
Francois Bleibel's avatar
Francois Bleibel committed
32

Thomas Moulard's avatar
Thomas Moulard committed
33
34
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
Francois Bleibel's avatar
Francois Bleibel committed
35

Thomas Moulard's avatar
Thomas Moulard committed
36
37
38
39
40
SET(PKG_CONFIG_ADDITIONAL_VARIABLES
  ${PKG_CONFIG_ADDITIONAL_VARIABLES}
  plugindirname
  plugindir
  )
Francois Bleibel's avatar
Francois Bleibel committed
41

Thomas Moulard's avatar
Thomas Moulard committed
42
43
SETUP_PROJECT()
# Search for dependencies.
44
ADD_REQUIRED_DEPENDENCY("eigenpy")
45
ADD_REQUIRED_DEPENDENCY("pinocchio >= 1.2.6")
46
47
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
ADD_REQUIRED_DEPENDENCY("sot-core >= 3.0.0")
48
ADD_REQUIRED_DEPENDENCY("sot-tools >= 2.0.0")
Francois Bleibel's avatar
Francois Bleibel committed
49

Guilhem Saurel's avatar
Guilhem Saurel committed
50
51
52
53
54
55
56
57
58
59
60
SET(BOOST_COMPONENTS filesystem system unit_test_framework)

OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
IF(BUILD_PYTHON_INTERFACE)
  FINDPYTHON()
  ADD_REQUIRED_DEPENDENCY("dynamic-graph-python >= 3.0.0")
  SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
  INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
ENDIF(BUILD_PYTHON_INTERFACE)


Thomas Moulard's avatar
Thomas Moulard committed
61
# List plug-ins that will be compiled.
62
SET(plugins
Thomas Moulard's avatar
Thomas Moulard committed
63
64
65
66
67
68
69
70
  zmpreffromcom
  force-compensation
  integrator-force-exact
  mass-apparent
  integrator-force-rk4
  integrator-force
  angle-estimator
  waist-attitude-from-sensor
Florent Lamiraux's avatar
Florent Lamiraux committed
71
  zmp-from-forces
Thomas Moulard's avatar
Thomas Moulard committed
72
73
  )

74
75
SET(LIBRARY_NAME ${PROJECT_NAME})
LIST(APPEND plugins dynamic)
76

77
# Add dependency toward sot-dynamic-pinocchio library in pkg-config file.
78
PKG_CONFIG_APPEND_LIBS(${LIBRARY_NAME})
79

olivier-stasse's avatar
olivier-stasse committed
80
SEARCH_FOR_BOOST()
81
SEARCH_FOR_EIGEN()
olivier-stasse's avatar
olivier-stasse committed
82

Thomas Moulard's avatar
Thomas Moulard committed
83
# Add subdirectories.
Francois Bleibel's avatar
Francois Bleibel committed
84
ADD_SUBDIRECTORY(include)
Thomas Moulard's avatar
Thomas Moulard committed
85
ADD_SUBDIRECTORY(src)
86
ADD_SUBDIRECTORY(doc)
87
ADD_SUBDIRECTORY(python)
Olivier Stasse's avatar
Olivier Stasse committed
88
ADD_SUBDIRECTORY(unitTesting)
Francois Bleibel's avatar
Francois Bleibel committed
89

Thomas Moulard's avatar
Thomas Moulard committed
90
SETUP_PROJECT_FINALIZE()
91
SETUP_PROJECT_CPACK()