CMakeLists.txt 2.33 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
#
Thomas Moulard's avatar
Thomas Moulard committed
3
4
5
6
7
# This file is part of sot-dynamic.
# sot-dynamic 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.
Francois Bleibel's avatar
Francois Bleibel committed
8
#
Thomas Moulard's avatar
Thomas Moulard committed
9
10
11
12
13
14
# sot-dynamic 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-dynamic. 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)
Francois Bleibel's avatar
Francois Bleibel committed
23

Thomas Moulard's avatar
Thomas Moulard committed
24
SET(PROJECT_NAME sot-dynamic)
25

26
27
SET(PROJECT_DESCRIPTION "pinocchio bindings for dynamic-graph.")
SET(PROJECT_URL "https://github.com/proyan/sot-dynamic/tree/topic/sot-pinocchio")
Francois Bleibel's avatar
Francois Bleibel committed
28

Thomas Moulard's avatar
Thomas Moulard committed
29
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
Francois Bleibel's avatar
Francois Bleibel committed
30

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

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

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

Thomas Moulard's avatar
Thomas Moulard committed
48
# List plug-ins that will be compiled.
49
SET(plugins
Thomas Moulard's avatar
Thomas Moulard committed
50
51
52
53
54
55
56
57
  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
58
  zmp-from-forces
Thomas Moulard's avatar
Thomas Moulard committed
59
60
  )

61
62
SET(LIBRARY_NAME ${PROJECT_NAME})
LIST(APPEND plugins dynamic)
63

Thomas Moulard's avatar
Thomas Moulard committed
64

65
LIST(APPEND LOGGING_WATCHED_TARGETS ${plugins})
Francois Bleibel's avatar
Francois Bleibel committed
66

67
# Add dependency toward sot-dynamic library in pkg-config file.
68
PKG_CONFIG_APPEND_LIBS(${LIBRARY_NAME})
69

olivier-stasse's avatar
olivier-stasse committed
70
71
# Search for dependencies.
# Boost
72
SET(BOOST_COMPONENTS filesystem system unit_test_framework python)
olivier-stasse's avatar
olivier-stasse committed
73
SEARCH_FOR_BOOST()
74
SEARCH_FOR_EIGEN()
olivier-stasse's avatar
olivier-stasse committed
75

Thomas Moulard's avatar
Thomas Moulard committed
76
# Add subdirectories.
Francois Bleibel's avatar
Francois Bleibel committed
77
ADD_SUBDIRECTORY(include)
Thomas Moulard's avatar
Thomas Moulard committed
78
ADD_SUBDIRECTORY(src)
79
ADD_SUBDIRECTORY(doc)
80
ADD_SUBDIRECTORY(python)
81
#ADD_SUBDIRECTORY(unitTesting)
Francois Bleibel's avatar
Francois Bleibel committed
82

Thomas Moulard's avatar
Thomas Moulard committed
83
SETUP_PROJECT_FINALIZE()
84
SETUP_PROJECT_CPACK()