forked from robotology/human-dynamics-estimation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (49 loc) · 2 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
cmake_minimum_required(VERSION 3.5)
project(HumanDynamicsEstimation CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(BUILD_DOCS)
add_subdirectory(doc)
return()
endif()
include(GNUInstallDirs)
include(CTest)
option(BUILD_TESTING "Build tests" OFF)
## Find packages
find_package(YARP REQUIRED)
find_package(YCM REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(iDynTree REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(AddWarningsConfigurationToTarget)
# To build shared libraries in Windows, we set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to TRUE
# See https://cmake.org/cmake/help/v3.4/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html
# See https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
# Shared/Dynamic or Static library?
option(BUILD_SHARED_LIBS "Build libraries as shared as opposed to static" ON)
include(AddInstallRPATHSupport)
#check discussion in YARP
option(HUMAN_DYNAMICS_ESTIMATION_ENABLE_RPATH "Enable rpath" TRUE)
mark_as_advanced(ENABLE_RPATH)
add_install_rpath_support(BIN_DIRS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
LIB_DIRS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
DEPENDS HUMAN_DYNAMICS_ESTIMATION_ENABLE_RPATH
USE_LINK_PATH)
option(HUMAN_DYNAMICS_ESTIMATION_DEBUG_MALLOC "Enable Eigen assertions on malloc" OFF)
add_subdirectory(ros-msgs)
#Add IK solver
find_package(IPOPT)
option(HUMAN_DYNAMICS_ESTIMATION_USE_IPOPT "Set if compile IPOPT dependent projects" ${IPOPT_FOUND})
if (HUMAN_DYNAMICS_ESTIMATION_USE_IPOPT)
add_subdirectory(inverse-kinematics)
endif()
add_subdirectory(human-state-provider)
add_subdirectory(human-forces-provider)
add_subdirectory(human-dynamics-estimator)
add_subdirectory(human-viz-bridge)
add_subdirectory(human-robot-pose)
add_subdirectory(app)
add_subdirectory(yarp)
#### add the "uninstall" target
include(AddUninstallTarget)