gplugin/gplugin
Clone
Summary
Browse
Changes
Graph
closing merged branch
draft
bugfix/clang-format-tweaks
2020-07-14, Gary Kramlich
731607ef94c6
closing merged branch
if
get_option
(
'perl'
)
if
not
get_option
(
'gobject-introspection'
)
error
(
'Perl plugin requires GObject Introspection.'
)
endif
GPLUGIN_PERL_SOURCES
=
[
'gplugin-perl-core.c'
,
'gplugin-perl-loader.c'
,
'gplugin-perl-plugin.c'
,
]
GPLUGIN_PERL_HEADERS
=
[
'gplugin-perl-loader.h'
,
'gplugin-perl-plugin.h'
,
]
# make sure we have the perl executable, we need it to figure out the
# build arguments.
PERL
=
find_program
(
'perl'
)
# make sure we have the gobject introspection perl module.
run_command
(
PERL
,
'-e use Glib::Object::Introspection;'
,
check
:
true
,
)
perl_dep
=
declare_dependency
(
compile_args
:
run_command
(
PERL
,
'-MExtUtils::Embed'
,
'-e'
,
'ccopts'
,
check
:
true
).
stdout
().
split
(),
link_args
:
run_command
(
PERL
,
'-MExtUtils::Embed'
,
'-e'
,
'ldopts'
,
check
:
true
).
stdout
().
split
(),
)
glib_perl_dep
=
declare_dependency
(
compile_args
:
run_command
(
PERL
,
'-MConfig'
,
'-e'
,
'print "-I$Config{vendorarch}/Glib/Install"'
,
check
:
true
).
stdout
().
split
(),
link_args
:
run_command
(
PERL
,
'-MConfig'
,
'-e'
,
'print "$Config{vendorarch}/auto/Glib/Glib.so"'
,
check
:
true
).
stdout
().
split
(),
)
shared_library
(
'gplugin-perl'
,
GPLUGIN_PERL_SOURCES
,
GPLUGIN_PERL_HEADERS
,
name_prefix
:
''
,
dependencies
:
[
GMODULE
,
gplugin_dep
,
perl_dep
,
glib_perl_dep
],
install
:
true
,
install_dir
:
join_paths
(
get_option
(
'libdir'
),
'gplugin'
)
)
endif
# perl
subdir
(
'tests'
)