-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
169 lines (139 loc) · 6.53 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
cmake_minimum_required(VERSION 2.8.12)
if(POLICY CMP0064 AND COMMAND cmake_policy)
cmake_policy(SET CMP0064 OLD)
endif(POLICY CMP0064 AND COMMAND cmake_policy)
project(robotology NONE)
macro(find_or_build_package_with_tag project_name enabled)
set(SUPERBUILD_${project_name} ${enabled} CACHE BOOL "Flag to compile ${project_name}")
IF(SUPERBUILD_${project_name})
find_or_build_package(${project_name})
ENDIF(SUPERBUILD_${project_name})
endmacro(find_or_build_package_with_tag)
## we have to enable C because it is currently used
## by CMake to describe packages (in Config*.cmake files)
enable_language(C)
# Set profile directory as first directory in the path, in order to
# be able to build subprojects with different flags depending on
# the profile
set(ROBOTOLOGY_PROFILE "$ENV{ROBOTOLOGY_PROFILE}")
if(NOT ROBOTOLOGY_PROFILE)
set(ROBOTOLOGY_PROFILE "DEFAULT")
endif()
string(TOLOWER "${ROBOTOLOGY_PROFILE}" profile_dir)
set(profile_dir ${CMAKE_SOURCE_DIR}/profiles/${profile_dir}/cmake)
if(EXISTS ${profile_dir})
list(APPEND CMAKE_MODULE_PATH ${profile_dir})
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(ROBOTOLOGY_MAJOR_VERSION 2)
set(ROBOTOLOGY_MINOR_VERSION 0)
set(ROBOTOLOGY_PATCH_VERSION 0)
set(ROBOTOLOGY_VERSION ${ROBOTOLOGY_MAJOR_VERSION}.${ROBOTOLOGY_MINOR_VERSION}.${ROBOTOLOGY_PATCH_VERSION})
set(YCM_EP_MAINTAINER_MODE FALSE)
include(CTest)
include(FeatureSummary)
set(YCM_GIT_GITLAB_ROBOTOLOGY_BASE_ADDRESS "https://gitlab.robotology.eu/" CACHE STRING "Address to use for Robotology Gitlab git repositories" FORCE)
if(UBUNTU_XENIAL)
set(YCM_USE_CMAKE_PROPOSED FALSE CACHE BOOL "Use files including unmerged cmake patches")
set(PYTHON_VERSION "2.7" CACHE STRING "Python Version" FORCE)
set(PYTHON_EXECUTABLE "/usr/bin/python2.7" CACHE STRING "Python Executable Path" FORCE)
set(PYTHON_INCLUDE_DIR "/usr/include/python2.7" CACHE STRING "Python Include Folder Path" FORCE)
set(PYTHON_LIBRARY "/usr/lib/x86_64-linux-gnu/libpython2.7.so" CACHE STRING "Python Library Folder Path" FORCE)
else(UBUNTU_XENIAL)
set(YCM_USE_CMAKE_PROPOSED TRUE CACHE BOOL "Use files including unmerged cmake patches")
endif(UBUNTU_XENIAL)
include(ProjectsTags OPTIONAL)
# Bootstrap YCM
include(YCMBootstrap)
include(FindOrBuildPackage)
include(YCMEPHelper)
#set(USE_SYSTEM_YARP OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_KDL_CODYCO OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_IDYNTREE OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_PARAMHELP OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_OPENSOT OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_IDYNUTILS OFF CACHE BOOL "Initial cache")
#set(USE_SYSTEM_GYM OFF CACHE BOOL "Initial cache")
# Only open source repo by default
set(USE_ONLY_OPEN_SOURCE ON CACHE BOOL "Only the open-source repo will be cloned and built")
# CORE packages
set(USE_DRC_CORE_PACKAGES OFF CACHE BOOL "CORE packages for robotology-superbuild")
# Tokyo University HYDRA OFF by default
set(YNL_HYDRA_TOKYO_UNIVERSITY OFF CACHE BOOL "Enable the download and usages of repos from University of Tokyo YNL Lab")
# ADVR-CORE packages
set(ADVR-CORE OFF CACHE BOOL "Enable the download and usages of ADVR core packages")
# CENTAURO EU Project
set(CENTAURO_EU OFF CACHE BOOL "Enable the download and usages of repos related to the CENTAURO project")
# WALKMAN-ROS
set(WALKMAN-ROS OFF CACHE BOOL "Enable the download and usages of walkman-ros packages")
# COGIMON EU Project
set(COGIMON_EU OFF CACHE BOOL "Enable the download and usages of repos related to the CoGiMon project")
# DEPRECATED packages
set(DEPRECATED_PACKAGES OFF CACHE BOOL "Enable the download and usages of repos from all the projects that are considered as DEPRECATED and not longer maintained")
# VIGIR Project
set(VIGIR OFF CACHE BOOL "Enable the download and usages of repos related to vigir robot team")
# WALK-MAN EU Project
set(WALKMAN_EU OFF CACHE BOOL "Enable the download and usages of repos related to the WALK-MAN project")
IF(NOT USE_ONLY_OPEN_SOURCE)
# set ssh connection with gitlab using rsa keys.
set(YCM_GIT_GITLAB_ROBOTOLOGY_BASE_ADDRESS "ssh://[email protected]/" CACHE STRING "Address to use for Robotology Gitlab git repositories" FORCE)
ENDIF(NOT USE_ONLY_OPEN_SOURCE)
# --------------------------------------
# Compile set of CORE packages
# --------------------------------------
IF(USE_DRC_CORE_PACKAGES)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects)
ENDIF(USE_DRC_CORE_PACKAGES)
# --------------------------------------
# Compile related ADVR-CORE packages
# --------------------------------------
IF(ADVR-CORE)
include(${CMAKE_CURRENT_SOURCE_DIR}/projects/advr-core/CMakeLists.txt)
ENDIF(ADVR-CORE)
# --------------------------------------
# Compile related CENTAURO packages
# --------------------------------------
IF(CENTAURO_EU)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects/centauro)
ENDIF(CENTAURO_EU)
# --------------------------------------
# Compile related WALKMAN-ROS packages
# --------------------------------------
IF(WALKMAN-ROS)
include(${CMAKE_CURRENT_SOURCE_DIR}/projects/walkman-ros/CMakeLists.txt)
ENDIF(WALKMAN-ROS)
# --------------------------------------
# Compile related COGIMON packages
# --------------------------------------
IF(COGIMON_EU)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects/cogimon)
ENDIF(COGIMON_EU)
# --------------------------------------
# Compile related VIGIR packages
# --------------------------------------
IF(VIGIR)
include(${CMAKE_CURRENT_SOURCE_DIR}/projects/vigir/CMakeLists.txt)
ENDIF(VIGIR)
# --------------------------------------
# Compile related WALK-MAN packages
# --------------------------------------
IF(WALKMAN_EU)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects/walkman)
ENDIF(WALKMAN_EU)
# --------------------------------------
# Compile related TOKYO UNIVERSITY packages
# --------------------------------------
IF(YNL_HYDRA_TOKYO_UNIVERSITY)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects/tokyo_university_ynl)
ENDIF(YNL_HYDRA_TOKYO_UNIVERSITY)
# --------------------------------------
# Compile DEPRECATED packages
# --------------------------------------
IF(DEPRECATED_PACKAGES)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/projects/DEPRECATED)
ENDIF(DEPRECATED_PACKAGES)
set_package_properties(Git PROPERTIES TYPE RUNTIME)
set_package_properties(Subversion PROPERTIES TYPE RUNTIME)
set_package_properties(PkgConfig PROPERTIES TYPE RUNTIME)
set_package_properties(Doxygen PROPERTIES TYPE RUNTIME)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)