-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmrbgem.rake
More file actions
27 lines (24 loc) · 933 Bytes
/
mrbgem.rake
File metadata and controls
27 lines (24 loc) · 933 Bytes
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
MRuby::Gem::Specification.new('mruby-lmdb') do |spec|
spec.license = 'Apache-2'
spec.author = 'Hendrik Beskow'
spec.summary = 'mruby bindings for LMDB (Lightning Memory-Mapped Database)'
spec.version = '2.0.0'
spec.add_dependency 'mruby-errno'
spec.add_dependency 'mruby-struct'
spec.add_dependency 'mruby-c-ext-helpers'
spec.add_test_dependency 'mruby-random'
spec.add_test_dependency 'mruby-io'
spec.add_test_dependency 'mruby-dir'
spec.add_test_dependency 'mruby-string-ext'
if spec.build.toolchains.include?('android')
spec.cc.defines << 'HAVE_PTHREADS'
elsif !spec.build.toolchains.include?('visualcpp')
spec.linker.libraries << 'pthread'
end
lmdb_src = "#{spec.dir}/lmdb/libraries/liblmdb"
spec.cc.include_paths << lmdb_src
spec.objs += %W(
#{lmdb_src}/mdb.c
#{lmdb_src}/midl.c
).map { |f| f.relative_path_from(dir).pathmap("#{build_dir}/%X#{spec.exts.object}") }
end