fix compilation on systems with old gdbus-codegen
This commit is contained in:
parent
00e7e87f55
commit
f137090d55
|
@ -38,6 +38,36 @@ endforeach
|
|||
|
||||
gdbus_codegen = find_program('gdbus-codegen')
|
||||
|
||||
r = run_command(gdbus_codegen, '--body', '--output', '/dev/null')
|
||||
if r.returncode() != 0
|
||||
gdbus_code_dsnw = custom_target(
|
||||
'dbus-status-notifier-watcher.[ch]',
|
||||
output: ['@BASENAME@.c','@BASENAME@.h'],
|
||||
input: './dbus-status-notifier-watcher.xml',
|
||||
command: [gdbus_codegen,'--c-namespace', 'Sn', '--generate-c-code', 'protocol/@BASENAME@', '@INPUT@'],
|
||||
)
|
||||
|
||||
gdbus_code_dsni = custom_target(
|
||||
'dbus-status-notifier-item.[ch]',
|
||||
output: ['@BASENAME@.c','@BASENAME@.h'],
|
||||
input: './dbus-status-notifier-item.xml',
|
||||
command: [gdbus_codegen,'--c-namespace', 'Sn', '--generate-c-code', 'protocol/@BASENAME@', '@INPUT@'],
|
||||
)
|
||||
|
||||
gdbus_code_dm = custom_target(
|
||||
'dbus-menu.[ch]',
|
||||
output: ['@BASENAME@.c','@BASENAME@.h'],
|
||||
input: './dbus-menu.xml',
|
||||
command: [gdbus_codegen,'--c-namespace', 'Sn', '--generate-c-code', 'protocol/@BASENAME@', '@INPUT@'],
|
||||
)
|
||||
|
||||
client_protos_src += gdbus_code_dsnw[0]
|
||||
client_protos_headers += gdbus_code_dsnw[1]
|
||||
client_protos_src += gdbus_code_dsni[0]
|
||||
client_protos_headers += gdbus_code_dsni[1]
|
||||
client_protos_src += gdbus_code_dm[0]
|
||||
client_protos_headers += gdbus_code_dm[1]
|
||||
else
|
||||
gdbus_code = generator(
|
||||
gdbus_codegen,
|
||||
output: '@BASENAME@.c',
|
||||
|
@ -58,6 +88,8 @@ client_protos_headers += gdbus_header.process('./dbus-status-notifier-item.xml')
|
|||
|
||||
client_protos_src += gdbus_code.process('./dbus-menu.xml')
|
||||
client_protos_headers += gdbus_header.process('./dbus-menu.xml')
|
||||
endif
|
||||
|
||||
|
||||
lib_client_protos = static_library(
|
||||
'client_protos',
|
||||
|
|
Loading…
Reference in New Issue