-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (58 loc) · 1.6 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
# Copyright 2014
#
# Maximilien Naveau
#
# LAAS, CNRS
#
# Creation: 30/10/2008
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(CMakeDependentOption)
#Configuration du projet
PROJECT(ComputeHRP2energy)
SET(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
INCLUDE_DIRECTORIES(./src/)
#Configuration de l'exécutable
FILE(
GLOB_RECURSE source_files
src/main.cc
src/motors.cc
src/explorefolder.cc
src/experience.cc
src/commonTools.cc
)
FILE(
GLOB_RECURSE include_files
src/main.hh
src/motors.hh
src/explorefolder.hh
src/experience.hh
src/commonTools.hh
)
# Search for boost
# Boost filesystem is used to read the datafiles.
SEARCH_FOR_BOOST()
# Use pinocchio to compute the torques during the motion
ADD_OPTIONAL_DEPENDENCY("pinocchio >= 1.2.4")
option(USE_PINOCCHIO "compile with pinocchio")
# add eigen to compute the torques via rnea
ADD_OPTIONAL_DEPENDENCY("eigen3 >= 3.0.5")
ADD_EXECUTABLE(hrp2energy ${source_files})
# link pinocchio
IF ( '${PINOCCHIO_FOUND}' STREQUAL '1' )
IF ( '${USE_PINOCCHIO}' STREQUAL 'ON' )
message (STATUS "## linking pinocchio ##" )
# equivalent of "#define PINOCCHIO=linked"
add_definitions ( -DPINOCCHIO="linked" )
# link pinocchio
PKG_CONFIG_USE_DEPENDENCY(hrp2energy pinocchio)
# add eigen
INCLUDE_DIRECTORIES(SYSTEM ${EIGEN3_INCLUDE_DIRS})
ENDIF ( '${USE_PINOCCHIO}' STREQUAL 'ON' )
ELSE ( '${PINOCCHIO_FOUND}' STREQUAL '1' )
message (STATUS "pinocchio not found" )
ENDIF ( '${PINOCCHIO_FOUND}' STREQUAL '1' )
# link BOOST
TARGET_LINK_LIBRARIES(hrp2energy ${Boost_LIBRARIES})