mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-06-13 15:29:32 +00:00
meson: use gnome.gdbus_codegen
This commit is contained in:
parent
07eb23da0f
commit
7f2e32585d
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#set -x
|
|
||||||
#echo "$@"
|
|
||||||
|
|
||||||
INPUT="$1"
|
|
||||||
OUTPUT0="$2"
|
|
||||||
|
|
||||||
BASENAME="$( basename "$INPUT" .xml )"
|
|
||||||
WD="$PWD"
|
|
||||||
DIR="$( dirname "$OUTPUT0" )"
|
|
||||||
|
|
||||||
cd "$DIR"
|
|
||||||
gdbus-codegen \
|
|
||||||
--generate-c-code "gdbo-${BASENAME}" \
|
|
||||||
--c-namespace GDBO \
|
|
||||||
--interface-prefix org.ofono. \
|
|
||||||
"${WD}/${INPUT}"
|
|
|
@ -1,38 +1,19 @@
|
||||||
gdbus_codegen = find_program('gdbus-codegen')
|
gnome = import('gnome')
|
||||||
|
dbus_interfaces = ['manager', 'modem', 'call']
|
||||||
|
|
||||||
gen_sh = find_program('gen.sh')
|
gdbus_src = []
|
||||||
|
foreach iface: dbus_interfaces
|
||||||
gdbofono_gen = generator(gen_sh,
|
gdbus_src += gnome.gdbus_codegen('gdbo-' + iface,
|
||||||
output : [ 'gdbo-@BASENAME@.c',
|
iface + '.xml',
|
||||||
'gdbo-@BASENAME@.h' ],
|
interface_prefix: 'org.ofono.',
|
||||||
arguments : [ '@INPUT@', '@OUTPUT0@' ])
|
namespace: 'GDBO')
|
||||||
|
endforeach
|
||||||
#manager_src = gdbus_ofono_gen.process('manager.xml')
|
|
||||||
#modem_src = gdbus_ofono_gen.process('modem.xml')
|
|
||||||
#call_src = gdbus_ofono_gen.process('call.xml')
|
|
||||||
|
|
||||||
manager_src = custom_target('manager',
|
|
||||||
input : 'manager.xml',
|
|
||||||
output : [ 'gdbo-manager.h',
|
|
||||||
'gdbo-manager.c' ],
|
|
||||||
command : [gen_sh, '@INPUT@', '@OUTPUT0@'])
|
|
||||||
|
|
||||||
modem_src = custom_target('modem',
|
|
||||||
input : 'modem.xml',
|
|
||||||
output : [ 'gdbo-modem.h',
|
|
||||||
'gdbo-modem.c' ],
|
|
||||||
command : [gen_sh, '@INPUT@', '@OUTPUT0@'])
|
|
||||||
|
|
||||||
call_src = custom_target('call',
|
|
||||||
input : 'call.xml',
|
|
||||||
output : [ 'gdbo-call.h',
|
|
||||||
'gdbo-call.c' ],
|
|
||||||
command : [gen_sh, '@INPUT@', '@OUTPUT0@'])
|
|
||||||
|
|
||||||
deps = [ dependency('gio-2.0'),
|
deps = [ dependency('gio-2.0'),
|
||||||
dependency('gio-unix-2.0'),
|
dependency('gio-unix-2.0'),
|
||||||
]
|
]
|
||||||
|
|
||||||
gdbofono_lib = shared_library('gdbofono',
|
gdbofono_lib = shared_library('gdbofono',
|
||||||
manager_src, modem_src, call_src,
|
gdbus_src,
|
||||||
dependencies : deps )
|
include_directories : include_directories('..'),
|
||||||
|
dependencies : deps )
|
||||||
|
|
Loading…
Reference in a new issue