gplugin/gplugin
Clone
Summary
Browse
Changes
Graph
closing this branch as there is no demand for this
feature/gjs-cc
17 months ago, Gary Kramlich
19f9798d59f3
closing this branch as there is no demand for this
if
get_option
(
'gjs'
)
if
not
get_option
(
'gobject-introspection'
)
error
(
'gnome-javascript plugin requires GObject Introspection.'
)
endif
GPLUGIN_GJS_SOURCES
=
[
'gplugin-gjs-core.cc'
,
'gplugin-gjs-loader.cc'
,
'gplugin-gjs-plugin.cc'
,
]
GPLUGIN_GJS_HEADERS
=
[
'gplugin-gjs-loader.h'
,
'gplugin-gjs-plugin.h'
,
]
GJS
=
dependency
(
'gjs-1.0'
,
version
:
'>=1.32.0'
)
# tell meson we need cpp since we have gjs
add_languages
(
'cpp'
)
gjs_args
=
[
'-DPREFIX="@0@"'
.
format
(
get_option
(
'prefix'
)),
'-DLIBDIR="@0@"'
.
format
(
get_option
(
'libdir'
)),
'-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"'
,
]
# check if we're using gcc
if
meson
.
get_compiler
(
'cpp'
).
get_id
()
==
'gcc'
or
host_machine
.
platform
()
==
'darwin'
gjs_args
+=
[
'-DGPLUGIN_UNUSED=__attribute__((unused))'
,
'-ggdb'
,
]
else
gjs_args
+=
[
'-DGPLUGIN_UNUSED='
,
]
endif
# now add the library
shared_library
(
'gplugin-gjs'
,
GPLUGIN_GJS_SOURCES
,
GPLUGIN_GJS_HEADERS
,
name_prefix
:
''
,
dependencies
:
[
GIO
,
GJS
,
gplugin_dep
],
install
:
true
,
install_dir
:
join_paths
(
get_option
(
'libdir'
),
'gplugin'
),
cpp_args
:
gjs_args
,
)
endif
# gjs
subdir
(
'tests'
)