CMakeLists.txt 2.21 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
20
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/lapack.cmake)
Francois Bleibel's avatar
Francois Bleibel committed
21

Thomas Moulard's avatar
Thomas Moulard committed
22
23
SET(PROJECT_NAME sot-dynamic)
SET(PROJECT_DESCRIPTION "jrl-dynamics bindings for dynamic-graph.")
24
SET(PROJECT_URL "http://github.com/jrl-umi3218/sot-dynamic")
Francois Bleibel's avatar
Francois Bleibel committed
25

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

Thomas Moulard's avatar
Thomas Moulard committed
28
29
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
Francois Bleibel's avatar
Francois Bleibel committed
30

Thomas Moulard's avatar
Thomas Moulard committed
31
32
33
34
35
SET(PKG_CONFIG_ADDITIONAL_VARIABLES
  ${PKG_CONFIG_ADDITIONAL_VARIABLES}
  plugindirname
  plugindir
  )
Francois Bleibel's avatar
Francois Bleibel committed
36

Thomas Moulard's avatar
Thomas Moulard committed
37
SETUP_PROJECT()
Francois Bleibel's avatar
Francois Bleibel committed
38

Thomas Moulard's avatar
Thomas Moulard committed
39
40
# Search for dependencies.
ADD_REQUIRED_DEPENDENCY("jrl-mal >= 1.8.0")
Francois Bleibel's avatar
Francois Bleibel committed
41

42
ADD_REQUIRED_DEPENDENCY("jrl-dynamics >= 1.16.1")
Thomas Moulard's avatar
Thomas Moulard committed
43
ADD_REQUIRED_DEPENDENCY("hrp2-dynamics >= 1.3.0")
Thomas Moulard's avatar
Thomas Moulard committed
44
ADD_REQUIRED_DEPENDENCY("hrp2-10-optimized >= 1.0")
Francois Bleibel's avatar
Francois Bleibel committed
45

Thomas Moulard's avatar
Thomas Moulard committed
46
47
ADD_REQUIRED_DEPENDENCY("hrp2_10")
ADD_REQUIRED_DEPENDENCY("hrp2_10-small")
Francois Bleibel's avatar
Francois Bleibel committed
48

Thomas Moulard's avatar
Thomas Moulard committed
49
50
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 1.0.0")
ADD_REQUIRED_DEPENDENCY("sot-core >= 1.0.0")
Francois Bleibel's avatar
Francois Bleibel committed
51

Thomas Moulard's avatar
Thomas Moulard committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# List plug-ins that will be compiled.
SET(libs
  zmpreffromcom
  force-compensation
  integrator-force-exact
  mass-apparent
  integrator-force-rk4
  integrator-force
  angle-estimator
  waist-attitude-from-sensor
  )

LIST(APPEND libs dynamic)
IF(HRP2_DYNAMICS_FOUND)
  LIST(APPEND libs dynamic-hrp2)
ENDIF()

IF(HRP2_10_OPTIMIZED_FOUND)
  LIST(APPEND libs dynamic-hrp2_10)
  LIST(APPEND libs dynamic-hrp2_10_old)
ENDIF()

LIST(APPEND LOGGING_WATCHED_TARGETS ${libs})
Francois Bleibel's avatar
Francois Bleibel 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)
Francois Bleibel's avatar
Francois Bleibel committed
79
80
ADD_SUBDIRECTORY(unitTesting)

Thomas Moulard's avatar
Thomas Moulard committed
81
SETUP_PROJECT_FINALIZE()