-
Notifications
You must be signed in to change notification settings - Fork 0
/
packages.autobuild
187 lines (150 loc) · 6.19 KB
/
packages.autobuild
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# This file defines the external packages from ROCK used in ESROCOS.
# The package definitons are copied from ROCK's package sets for
# maintenance of the ESROCOS system.
cmake_package 'base/cmake' do |pkg|
Autobuild.env_add_path 'CMAKE_PREFIX_PATH', pkg.prefix
end
cmake_package 'base/console_bridge'
cmake_package 'base/logging'
orogen_package 'base/orogen/std'
orogen_package 'base/orogen/types' do |pkg|
pkg.orogen_file = "base.orogen"
if package_selected?('external/sisl')
pkg.define "SISL_PREFIX", package('external/sisl').prefix
end
Autoproj.env_set 'ROCK_PREFIX', File.join(pkg.prefix,'share','rock')
pkg.remove_obsolete_installed_file "share", "typelib", "ruby", "base.rb"
end
import_package 'base/templates/cmake_lib' do |pkg|
pkg.env_set "ROCK_TEMPLATE_PREFIX", File.join(File.expand_path('..', pkg.srcdir), '')
pkg.env_set "ROCK_TEMPLATE_SUFFIX", ""
end
cmake_package 'base/types' do |pkg|
pkg.depends_on 'rice'
if package_enabled?('external/sisl')
pkg.define 'SISL_PREFIX', package('external/sisl').prefix
end
pkg.define "RUBY_EXECUTABLE", Autoproj.config.ruby_executable
end
cmake_package 'control/kdl' do |pkg|
pkg.depends_on 'base/cmake'
pkg.with_doc 'docs'
pkg.doc_dir = File.join('orocos_kdl', 'doc', 'api', 'html')
end
cmake_package 'control/kdl_parser'
cmake_package 'control/sdformat'
cmake_package 'control/urdfdom' do |pkg|
pkg.depends_on 'control/urdfdom_headers'
pkg.depends_on 'base/console_bridge'
end
cmake_package 'control/urdfdom_headers'
cmake_package 'external/sisl' do |pkg|
pkg.define "BUILD_SHARED_LIBS","ON"
pkg.doc_task do
pkg.message "copying HTML documentation from %s"
end # Nothing to do, SISL ships with the generated documentation
pkg.doc_dir = File.join(pkg.srcdir, 'doc', 'html')
end
cmake_package 'gui/osgviz'
cmake_package 'gui/robot_model'
cmake_package 'gui/vizkit3d' do |pkg|
pkg.define "OROCOS_TARGET", Autoproj.config.get('rtt_target')
Autoproj.env_add_path 'OSG_FILE_PATH', File.join(pkg.prefix, "share", "vizkit" )
# Add our prefix to the VIZKIT_PLUGIN_RUBY_PATH. Relevant packages will have
# to list the place where they install themselves
# TODO the path should be renamed to VIZKIT3D_PLUGIN_PATH
Autoproj.env_add_path 'VIZKIT_PLUGIN_RUBY_PATH', File.join(pkg.prefix, 'lib')
Autoproj.env_add_path 'VIZKIT_PLUGIN_RUBY_PATH', File.join(pkg.prefix, 'lib', 'vizkit')
end
ruby_package 'orogen'
move_package 'orogen', 'tools'
cmake_package 'rtt' do |pkg|
pkg.always_reconfigure = true
pkg.doc_dir = File.join('doc', 'api', 'html')
pkg.with_doc('docapi')
target = Autoproj.config.get('rtt_target')
env_set 'OROCOS_TARGET', target
pkg.define 'OROCOS_TARGET', target
env_add 'CMAKE_PREFIX_PATH', pkg.prefix
# Used by the oroGen handler
pkg.provides "pkgconfig/orocos-rtt-#{target}"
Autoproj.config.get('rtt_corba_implementation')
# Disable building the test suite because it needs a lot of time and memory
pkg.with_tests
pkg.test_utility.source_dir = File.join(pkg.srcdir, 'tests')
pkg.define 'BUILD_TESTING', pkg.test_utility.enabled?
corba = Autoproj.config.get('rtt_corba_implementation')
if corba == 'none'
Autobuild::Orogen.corba = false
pkg.define 'ENABLE_CORBA', 'OFF'
else
Autobuild::Orogen.corba = true
pkg.define 'ENABLE_CORBA', 'YES'
pkg.define 'CORBA_IMPLEMENTATION', corba.upcase
pkg.depends_on corba.downcase
end
end
setup_package 'rtt' do |rtt|
rtt.define "DEFAULT_PLUGIN_PATH", "/"
rtt.post_import do
# There was a bug in RTT CMake code that generated the pluginpath.cpp file
# in the source directory. Delete that file so that the DEFAULT_PLUGIN_PATH
# change above is effective
FileUtils.rm_f File.join(rtt.srcdir, "rtt", "plugin", "pluginpath.cpp")
end
if rtt.respond_to?(:add_tag)
rtt.add_tag 'stable'
end
if Autoproj.config.get('USE_OCL')
rtt.define "PLUGINS_ENABLE_SCRIPTING", "ON"
rtt.define 'ORO_DISABLE_PORT_DATA_SCRIPTING', 'OFF'
Autobuild::Orogen.default_type_export_policy = 'all'
else
rtt.define "PLUGINS_ENABLE_SCRIPTING", "OFF"
rtt.define 'ORO_DISABLE_PORT_DATA_SCRIPTING', 'ON'
Autobuild::Orogen.default_type_export_policy = 'used'
Autobuild::Orogen.orogen_options << "--no-rtt-scripting"
end
rtt.disable_doc
rtt.define 'ENABLE_TESTS', rtt.test_utility.enabled?
end
move_package 'rtt', 'tools'
cmake_package 'rtt_typelib'
move_package 'rtt_typelib', 'tools'
ruby_package 'tools/metaruby'
# For ROS compatibility, ROS does not like paths in package names
metapackage 'metaruby', 'tools/metaruby'
# The Autoproj API does not allow to put a package higher in the hierarchy, only
# lower. Trick it.
Autoproj.manifest.moved_packages['tools/metaruby'] = 'metaruby'
cmake_package 'tools/orogen_metadata' do |pkg|
Autoproj.env_add_path 'OROGEN_PLUGIN_PATH', File.join(pkg.prefix, 'share', 'orogen', 'plugins')
pkg.remove_obsolete_installed_file('share', 'orogen', 'plugins', 'metadata_plugin.rb')
pkg.remove_obsolete_installed_file('share', 'typelib', 'ruby', 'metadata_typelib.rb')
end
cmake_package 'typelib' do |pkg|
pkg.define 'RUBY_EXECUTABLE', Autoproj::CmdLine.ruby_executable
pkg.env_set 'TYPELIB_PLUGIN_PATH', File.join(pkg.prefix, 'lib', 'typelib')
# Enable the castxml importer by adding the following in autoproj/init.rb
#
# Autoproj.config.set 'typelib_cxx_loader', 'castxml'
cxx_loader = Autoproj.config.get 'typelib_cxx_loader', 'gccxml'
pkg.define 'BUILD_CLANG_TLB_IMPORTER', (cxx_loader == 'clang')
pkg.env_set 'TYPELIB_CXX_LOADER', cxx_loader
pkg.post_import do
if cxx_loader == 'clang'
pkg.message '%s: using the clang importer'
pkg.depends_on 'clang-3.4'
elsif cxx_loader == 'castxml'
pkg.message '%s: using the castxml importer'
pkg.depends_on 'castxml'
else
pkg.message '%s: using the gccxml importer'
pkg.depends_on 'gccxml'
end
end
end
move_package 'typelib', 'tools'
ruby_package 'utilrb'
move_package 'utilrb', 'tools'
cmake_package 'drivers/controldev'