mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
meson: use gnome.gdbus_codegen
This commit is contained in:
parent
07eb23da0f
commit
7f2e32585d
2 changed files with 12 additions and 49 deletions
|
@ -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')
|
||||
|
||||
gdbofono_gen = generator(gen_sh,
|
||||
output : [ 'gdbo-@BASENAME@.c',
|
||||
'gdbo-@BASENAME@.h' ],
|
||||
arguments : [ '@INPUT@', '@OUTPUT0@' ])
|
||||
|
||||
#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@'])
|
||||
gdbus_src = []
|
||||
foreach iface: dbus_interfaces
|
||||
gdbus_src += gnome.gdbus_codegen('gdbo-' + iface,
|
||||
iface + '.xml',
|
||||
interface_prefix: 'org.ofono.',
|
||||
namespace: 'GDBO')
|
||||
endforeach
|
||||
|
||||
deps = [ dependency('gio-2.0'),
|
||||
dependency('gio-unix-2.0'),
|
||||
]
|
||||
|
||||
gdbofono_lib = shared_library('gdbofono',
|
||||
manager_src, modem_src, call_src,
|
||||
dependencies : deps )
|
||||
gdbus_src,
|
||||
include_directories : include_directories('..'),
|
||||
dependencies : deps )
|
||||
|
|
Loading…
Reference in a new issue