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

SET(LIBRARY_NAME ${PROJECT_NAME})
SET(IDL_SOURCES
Guilhem Saurel's avatar
Format    
Guilhem Saurel committed
20
21
  rbprmbuilder
  )
Steve Tonneau's avatar
Steve Tonneau committed
22

23
24
INCLUDE(${HPP_CORBASERVER_CMAKE_PLUGIN})

Steve Tonneau's avatar
Steve Tonneau committed
25
26
27
28
29
OMNIIDL_INCLUDE_DIRECTORIES(
  ${HPP_CORBASERVER_DATAROOTDIR}/idl ${CMAKE_SOURCE_DIR}/idl
  )

INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
Steve Tonneau's avatar
Steve Tonneau committed
30
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
31

Steve Tonneau's avatar
Steve Tonneau committed
32
33
FOREACH(IDL ${IDL_SOURCES})
  GENERATE_IDL_CPP (hpp/corbaserver/rbprm/${IDL}
34
35
36
37
38
39
40
41
42
43
    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm
    HEADER_SUFFIX -idl.hh)
  GENERATE_IDL_PYTHON (${IDL}
    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm
    ENABLE_DOCSTRING
    STUBS hpp_stubs.rbprm
    ARGUMENTS
    -Wbmodules=hpp_idl
    -Wbextern=common:hpp_stubs
    )
Steve Tonneau's avatar
Steve Tonneau committed
44
45

  INSTALL(
46
    FILES ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/${IDL}-idl.hh
Steve Tonneau's avatar
Steve Tonneau committed
47
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hpp/corbaserver/rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
48
ENDFOREACH()
49
50
51
52
53
54
INSTALL(
  DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/hpp_idl/hpp/corbaserver/rbprm
  DESTINATION ${PYTHON_SITELIB}/hpp_idl/hpp/corbaserver)
INSTALL(
  DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/hpp_stubs/rbprm
  DESTINATION ${PYTHON_SITELIB}/hpp_stubs)
Steve Tonneau's avatar
Steve Tonneau committed
55

56
57
HPP_ADD_SERVER_PLUGIN(rbprm-corba
  SOURCES
58
  ${ALL_IDL_CPP_STUBS}
Steve Tonneau's avatar
Steve Tonneau committed
59
60
61
  rbprmbuilder.impl.cc
  rbprmbuilder.impl.hh
  server.cc
62
63
64
65
66
67
68

  PKG_CONFIG_DEPENDENCIES
  hpp-rbprm
  hpp-corbaserver
  omniORB4
  hpp-util
  hpp-rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
69

70
71
ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS})
ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS})
72
73
74
ADD_DEPENDENCIES (rbprm-corba generate_idl_cpp)
ADD_DEPENDENCIES (rbprm-corba generate_idl_python)
TARGET_INCLUDE_DIRECTORIES(rbprm-corba PUBLIC ${CDD_INCLUDE_DIRS})
Steve Tonneau's avatar
Steve Tonneau committed
75
76
77

# Stand alone corba server
ADD_EXECUTABLE (hpp-rbprm-server hpp-rbprm-corba.cc)
78
79

PKG_CONFIG_USE_DEPENDENCY(hpp-rbprm-server hpp-corbaserver)
80
PKG_CONFIG_USE_DEPENDENCY(hpp-rbprm-server hpp-pinocchio)
81

Steve Tonneau's avatar
Steve Tonneau committed
82
INSTALL (TARGETS hpp-rbprm-server DESTINATION ${CMAKE_INSTALL_BINDIR})
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
SET(${PROJECT_NAME}_PYTHON_FILES
    __init__.py
    __main__.py
    client.py
    fewstepsplanner.py
    rbprmbuilder.py
    rbprmfullbody.py
    rbprmstate.py
    state_alg.py
    )

SET(${PROJECT_NAME}_PYTHON_TOOLS
    affordance_centroids.py
    com_constraints.py
    constraint_to_dae.py
    cwc_trajectory_helper.py
    cwc_trajectory.py
    display_tools.py
    generateROMs.py
    getSurfaceExtremumPoints.py
    __init__.py
    narrow_convex_hull.py
    obj_to_constraints.py
    path_to_trajectory.py
    plot_analytics.py
    sample_random_transition.py
    sample_root_config.py
    sampleRotation.py
    surfaces_from_path.py
    time_out.py
    )

SET(${PROJECT_NAME}_PYTHON_SCENARIOS
    abstract_contact_generator.py 
    abstract_path_planner.py
    anymal_contact_generator.py
    anymal_path_planner.py
    hrp2_contact_generator.py
    hrp2_path_planner.py
    hyq_contact_generator.py
    hyq_path_planner.py
    __init__.py
    talos_contact_generator.py
    talos_path_planner.py
    )

SET(${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS
    hrp2_flatGround_path.py
    hrp2_flatGround.py
    hrp2_plateformes_path.py
    hrp2_plateformes.py
    hyq_darpa_path.py
    hyq_darpa.py
    hyq_slalom_debris_path.py
    hyq_slalom_debris.py
    __init__.py
    talos_flatGround_path.py
    talos_flatGround.py
    talos_navBauzil_hard_path.py
    talos_navBauzil_hard.py
    talos_navBauzil_path.py
    talos_navBauzil.py
    talos_plateformes_path.py
    talos_plateformes.py
    talos_stairs10_path.py 
    talos_stairs10.py
    )

SET(${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO
    anymal_circle_oriented_path.py
    anymal_circle_oriented.py
    anymal_circle_path.py
    anymal_circle.py
    anymal_contact_generator.py
    anymal_platform_random_path.py
    anymal_platform_random.py
    __init__.py
    talos_bauzil_with_stairs_path.py
    talos_circle_oriented_path.py
    talos_circle_oriented.py
    talos_circle_path.py
    talos_circle.py
    talos_contact_generator.py
    talos_mazeEas_oriented_path.py
    talos_mazeEas_path.py
    talos_moveEffector_flat.py
    talos_moveEffector_stairs_m10.py
    talos_moveEffector_stairs_m15.py
    talos_moveEffector_stairs_p10.py
    talos_moveEffector_stairs_p15.py
    talos_navBauzil_oriented_path.py
    talos_navBauzil_path.py
    talos_navBauzil.py
    talos_platform_random_path.py
    talos_platform_random.py
    talos_randomMove_flat.py
    talos_randomMove_path.py
    talos_stairs10_random_path.py
    talos_stairs10_random.py
    )

185
# Install python files : 
186
187
188
FOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
  PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
189
190

# /tools 
191
192
193
FOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS})
  PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/tools" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS})
194
195

# /scenarios
196
197
198
FOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS})
  PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/scenarios" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS})
199
200

# /scenarios/demos
201
202
203
FOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS})
  PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/scenarios/demos" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS})
204
205

# /scenarios/memmo
206
207
208
FOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO})
  PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/scenarios/memmo" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO})
209
210
211
212
213