gplugin/gplugin
Clone
Summary
Browse
Changes
Graph
closing this branch as there is no demand for this
feature/ruby-loader
16 months ago, Gary Kramlich
d44bad5e041e
closing this branch as there is no demand for this
if
get_option
(
'ruby'
)
if
not
get_option
(
'gobject-introspection'
)
error
(
'Ruby plugin requires GObject Introspection.'
)
endif
GPLUGIN_RUBY_SOURCES
=
[
'gplugin-ruby-core.c'
,
'gplugin-ruby-loader.c'
,
'gplugin-ruby-plugin.c'
,
'gplugin-ruby-protect.c'
,
]
GPLUGIN_RUBY_HEADERS
=
[
'gplugin-ruby-loader.h'
,
'gplugin-ruby-plugin.h'
,
'gplugin-ruby-protect.h'
,
]
_RUBYS
=
[[
'ruby-2.5'
,
'>=2.5.0'
],
[
'ruby-2.4'
,
'>=2.4.0'
],
[
'ruby-2.3'
,
'>=2.3.0'
],
[
'ruby-2.2'
,
'>=2.2.0'
],
[
'ruby-2.1'
,
'>=2.1.0'
]]
RUBY_FOUND
=
false
foreach
_RUBY
:
_RUBYS
if
not
RUBY_FOUND
RUBY
=
dependency
(
_RUBY
[
0
],
version
:
_RUBY
[
1
],
required
:
false
)
RUBY_FOUND
=
RUBY
.
found
()
endif
endforeach
if
not
RUBY_FOUND
error
(
'No usable Ruby library was found'
)
endif
# now add the library
shared_library
(
'gplugin-ruby'
,
GPLUGIN_RUBY_SOURCES
,
GPLUGIN_RUBY_HEADERS
,
name_prefix
:
''
,
dependencies
:
[
RUBY
,
gplugin_dep
],
install
:
true
,
install_dir
:
join_paths
(
get_option
(
'libdir'
),
'gplugin'
)
)
endif
# ruby
subdir
(
'tests'
)