2018-08-12 06:26:29 -07:00
|
|
|
wayland_scanner_bin = find_program('wayland-scanner')
|
|
|
|
|
|
|
|
#make it typo proof
|
|
|
|
_wayland_protocols = dependency('wayland-protocols')
|
|
|
|
wayland_client = dependency('wayland-client')
|
|
|
|
|
|
|
|
wl_protocol_local = [
|
|
|
|
'efl-aux-hints.xml',
|
|
|
|
'efl-hints.xml',
|
2021-03-01 08:22:58 -08:00
|
|
|
'session-recovery.xml'
|
2018-08-12 06:26:29 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
wl_unstable_protocol_sys = [
|
|
|
|
join_paths('xdg-shell', 'xdg-shell-unstable-v6.xml'),
|
|
|
|
join_paths('linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'),
|
|
|
|
join_paths('text-input', 'text-input-unstable-v1.xml'),
|
|
|
|
]
|
|
|
|
|
|
|
|
wl_stable_protocol_sys = [
|
|
|
|
join_paths('xdg-shell', 'xdg-shell.xml'),
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach sys_protocol : wl_unstable_protocol_sys
|
2018-10-13 03:24:37 -07:00
|
|
|
wl_protocol_local += [
|
2018-08-12 06:26:29 -07:00
|
|
|
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
|
|
|
|
sys_protocol)]
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach sys_protocol : wl_stable_protocol_sys
|
2018-10-13 03:24:37 -07:00
|
|
|
wl_protocol_local += [
|
2018-08-12 06:26:29 -07:00
|
|
|
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable',
|
|
|
|
sys_protocol)]
|
|
|
|
endforeach
|
|
|
|
|
2018-10-13 03:24:37 -07:00
|
|
|
gen_obj_c = []
|
|
|
|
gen_obj_header = []
|
2018-08-12 06:26:29 -07:00
|
|
|
|
|
|
|
foreach item : wl_protocol_local
|
2018-10-13 03:24:37 -07:00
|
|
|
gen_obj_c += custom_target('wl_code_'+item.underscorify(),
|
2018-08-12 06:26:29 -07:00
|
|
|
input: item,
|
|
|
|
output : ['@BASENAME@-protocol.c'],
|
2021-05-06 04:55:21 -07:00
|
|
|
command: [wayland_scanner_bin, ['private-code','@INPUT@','@OUTPUT@']]
|
2018-08-12 06:26:29 -07:00
|
|
|
)
|
2018-10-13 03:24:37 -07:00
|
|
|
gen_obj_header += custom_target('wl_client_header_'+item.underscorify(),
|
2018-08-12 06:26:29 -07:00
|
|
|
input: item,
|
|
|
|
output : ['@BASENAME@-client-protocol.h'],
|
|
|
|
command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']]
|
|
|
|
)
|
2018-10-13 03:24:37 -07:00
|
|
|
gen_obj_header += custom_target('wl_server_header_'+item.underscorify(),
|
2018-08-12 06:26:29 -07:00
|
|
|
input: item,
|
|
|
|
output : ['@BASENAME@-server-protocol.h'],
|
|
|
|
command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']]
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
|
|
wayland_protocol_lib = static_library('wayland_protocol',
|
2018-10-13 03:24:37 -07:00
|
|
|
gen_obj_c + gen_obj_header,
|
2018-08-12 06:26:29 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
wayland_protocol = declare_dependency(
|
|
|
|
include_directories: include_directories('.'),
|
|
|
|
link_with: wayland_protocol_lib,
|
2018-10-13 03:24:37 -07:00
|
|
|
sources: gen_obj_header,
|
2018-08-12 06:26:29 -07:00
|
|
|
dependencies : [wayland_client]
|
2018-10-13 03:24:37 -07:00
|
|
|
)
|
2020-05-10 05:41:57 -07:00
|
|
|
|
|
|
|
wayland_protocol_simple = declare_dependency(
|
|
|
|
include_directories: include_directories('.'),
|
|
|
|
sources: gen_obj_header,
|
|
|
|
)
|