CMakeLists.txt 2.66 KB
Newer Older
1
2
#
# Copyright (c) 2011 CNRS
Florent Lamiraux's avatar
Florent Lamiraux committed
3
# Author: Florent Lamiraux
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#
# This file is part of hpp-model
# hpp-model 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.
#
# hpp-model 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
# hpp-model  If not, see
# <http://www.gnu.org/licenses/>.

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/base.cmake)
24
INCLUDE(cmake/boost.cmake)
25
26
27
28
29
30
INCLUDE(cmake/cpack.cmake)

SET(PROJECT_NAME hpp-model)
SET(PROJECT_DESCRIPTION
  "Implementation of hybrid geometric and dynamic humanoid robots"
  )
31
SET(PROJECT_URL "https://github.com/humanoid-path-planner/hpp-model")
32
33
34
35
36
37

# Where to compile shared objects
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

SETUP_PROJECT()

38
# Activate hpp-util logging if requested
Florent Lamiraux's avatar
Florent Lamiraux committed
39
SET (HPP_DEBUG FALSE CACHE BOOL "trigger hpp-util debug output")
40
41
42
43
IF (HPP_DEBUG)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
ENDIF()

44
45
46
# Add a cache variable to allow not compiling and running tests
set (RUN_TESTS TRUE CACHE BOOL "compile and run unit tests")

Florent Lamiraux's avatar
Florent Lamiraux committed
47
# Declare headers
48
SET(${PROJECT_NAME}_HEADERS
Florent Lamiraux's avatar
Florent Lamiraux committed
49
  include/hpp/model/body.hh
50
  include/hpp/model/children-iterator.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
51
52
  include/hpp/model/collision-object.hh
  include/hpp/model/configuration.hh
53
  include/hpp/model/device.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
54
  include/hpp/model/distance-result.hh
55
  include/hpp/model/extra-config-space.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
56
  include/hpp/model/fcl-to-eigen.hh
57
  include/hpp/model/fwd.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
58
  include/hpp/model/humanoid-robot.hh
59
  include/hpp/model/joint.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
60
61
62
  include/hpp/model/joint-configuration.hh
  include/hpp/model/object-factory.hh
  include/hpp/model/object-iterator.hh
63
  include/hpp/model/gripper.hh
64
  include/hpp/model/center-of-mass-computation.hh
65
  include/hpp/model/debug.hh
66
67
68
  )

# Declare dependencies
69
70
71
72
IF (RUN_TESTS)
  SET(BOOST_COMPONENTS unit_test_framework)
  SEARCH_FOR_BOOST()
ENDIF ()
Florent Lamiraux's avatar
Florent Lamiraux committed
73
74

ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2")
75
ADD_REQUIRED_DEPENDENCY("hpp-util >= 0.7")
76
ADD_REQUIRED_DEPENDENCY("hpp-fcl >= 0.2.9")
Joseph Mirabel's avatar
Joseph Mirabel committed
77
ADD_OPTIONAL_DEPENDENCY("assimp")
78

Florent Lamiraux's avatar
Florent Lamiraux committed
79
80
81
# Compile documentation
CONFIGURE_FILE(doc/main.hh.in doc/main.hh)

82
ADD_SUBDIRECTORY(src)
83
84
85
IF (RUN_TESTS)
 ADD_SUBDIRECTORY(tests)
ENDIF ()
86

87
88
89
# Add dependency toward hpp-model library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("hpp-model")

90
91
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()