Commit 7f2e3258 authored by Guido Gunther's avatar Guido Gunther
Browse files

meson: use gnome.gdbus_codegen

parent 07eb23da
#!/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}"
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 )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment