-
Notifications
You must be signed in to change notification settings - Fork 6
/
orocos.autobuild
98 lines (85 loc) · 3.43 KB
/
orocos.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
configuration_option 'rtt_target', 'string',
default: 'gnulinux',
possible_values: %w[gnulinux xenomai macosx],
doc: 'the target operating system for Orocos/RTT '\
'(gnulinux, xenomai, or macosx)'
configuration_option 'rtt_corba_implementation', 'string',
default: 'omniorb',
lowercase: true,
possible_values: %w[none tao omniorb],
doc: ['which CORBA implementation should the RTT use ?',
'Answer "none" to disable CORBA, otherwise pick '\
'either tao or omniorb']
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
# Install the OCL only to get the task browser
cmake_package 'ocl' do |pkg|
pkg.always_reconfigure = true
pkg.doc_dir = File.join('doc', 'api', 'html')
pkg.with_doc('docapi')
target = Autoproj.config.get('rtt_target')
pkg.define 'OROCOS_TARGET', target
end
cmake_package 'log4cpp'
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'
ruby_package 'utilrb'
cmake_package 'utilmm' do |pkg|
pkg.doc_dir = File.join('doc', 'html')
end
remove_from_default 'utilmm'
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
cmake_package 'castxml'
remove_from_default 'castxml'
cmake_package 'rtt_typelib'
ruby_package 'orogen'
cmake_package 'stdint_typekit'