This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
91 lines (77 loc) · 2.66 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# Copyright (c) 2011 CNRS
# Author: Florent Lamiraux
#
#
# 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)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/cpack.cmake)
SET(PROJECT_NAME hpp-model)
SET(PROJECT_DESCRIPTION
"Implementation of hybrid geometric and dynamic humanoid robots"
)
SET(PROJECT_URL "https://github.com/humanoid-path-planner/hpp-model")
# Where to compile shared objects
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SETUP_PROJECT()
# Activate hpp-util logging if requested
SET (HPP_DEBUG FALSE CACHE BOOL "trigger hpp-util debug output")
IF (HPP_DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
ENDIF()
# Add a cache variable to allow not compiling and running tests
set (RUN_TESTS TRUE CACHE BOOL "compile and run unit tests")
# Declare headers
SET(${PROJECT_NAME}_HEADERS
include/hpp/model/body.hh
include/hpp/model/children-iterator.hh
include/hpp/model/collision-object.hh
include/hpp/model/configuration.hh
include/hpp/model/device.hh
include/hpp/model/distance-result.hh
include/hpp/model/extra-config-space.hh
include/hpp/model/fcl-to-eigen.hh
include/hpp/model/fwd.hh
include/hpp/model/humanoid-robot.hh
include/hpp/model/joint.hh
include/hpp/model/joint-configuration.hh
include/hpp/model/object-factory.hh
include/hpp/model/object-iterator.hh
include/hpp/model/gripper.hh
include/hpp/model/center-of-mass-computation.hh
include/hpp/model/debug.hh
)
# Declare dependencies
IF (RUN_TESTS)
SET(BOOST_COMPONENTS unit_test_framework)
SEARCH_FOR_BOOST()
ENDIF ()
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 0.7")
ADD_REQUIRED_DEPENDENCY("hpp-fcl >= 0.2.9")
ADD_OPTIONAL_DEPENDENCY("assimp")
# Compile documentation
CONFIGURE_FILE(doc/main.hh.in doc/main.hh)
ADD_SUBDIRECTORY(src)
IF (RUN_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF ()
# Add dependency toward hpp-model library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("hpp-model")
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()