CMakeLists.txt 2.25 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)
21
INCLUDE(cmake/cpack.cmake)
Francois Bleibel's avatar
Francois Bleibel committed
22

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

Thomas Moulard's avatar
Thomas Moulard committed
25
SET(PROJECT_DESCRIPTION "jrl-dynamics bindings for dynamic-graph.")
26
SET(PROJECT_URL "http://github.com/stack-of-tasks/sot-dynamic")
Francois Bleibel's avatar
Francois Bleibel committed
27

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

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

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

Thomas Moulard's avatar
Thomas Moulard committed
39
SETUP_PROJECT()
Francois Bleibel's avatar
Francois Bleibel committed
40

Thomas Moulard's avatar
Thomas Moulard committed
41
# Search for dependencies.
42
ADD_REQUIRED_DEPENDENCY("jrl-mal >= 1.9.0")
Francois Bleibel's avatar
Francois Bleibel committed
43

44
ADD_REQUIRED_DEPENDENCY("jrl-dynamics >= 1.19.0")
Francois Bleibel's avatar
Francois Bleibel committed
45

46
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 2.5.0")
47
ADD_REQUIRED_DEPENDENCY("sot-core >= 2.5")
48
ADD_REQUIRED_DEPENDENCY("sot-tools")
Francois Bleibel's avatar
Francois Bleibel committed
49

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

63
64
SET(LIBRARY_NAME ${PROJECT_NAME})
LIST(APPEND plugins dynamic)
65

Thomas Moulard's avatar
Thomas Moulard committed
66

67
LIST(APPEND LOGGING_WATCHED_TARGETS ${plugins})
Francois Bleibel's avatar
Francois Bleibel committed
68

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

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

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

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