mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
meson: Fix protocol includes for compositor examples
This commit is contained in:
parent
57ffb35de0
commit
70a084c119
@ -16,5 +16,5 @@ client_protos = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
foreach proto : client_protos
|
foreach proto : client_protos
|
||||||
wlr_files += get_variable(proto.underscorify() + '_h')
|
wlr_files += get_variable(proto.underscorify() + '_client_h')
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -42,6 +42,7 @@ compositors = {
|
|||||||
},
|
},
|
||||||
'fullscreen-shell': {
|
'fullscreen-shell': {
|
||||||
'src': 'fullscreen-shell.c',
|
'src': 'fullscreen-shell.c',
|
||||||
|
'proto': ['fullscreen-shell-unstable-v1'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,9 +152,14 @@ clients = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach name, info : compositors
|
foreach name, info : compositors
|
||||||
|
extra_src = []
|
||||||
|
foreach p : info.get('proto', [])
|
||||||
|
extra_src += get_variable(p.underscorify() + '_server_h')
|
||||||
|
endforeach
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
name,
|
name,
|
||||||
info.get('src'),
|
[info.get('src'), extra_src],
|
||||||
dependencies: wlroots,
|
dependencies: wlroots,
|
||||||
include_directories: [wlr_inc, proto_inc],
|
include_directories: [wlr_inc, proto_inc],
|
||||||
build_by_default: get_option('examples'),
|
build_by_default: get_option('examples'),
|
||||||
@ -164,7 +170,7 @@ foreach name, info : clients
|
|||||||
extra_src = []
|
extra_src = []
|
||||||
foreach p : info.get('proto')
|
foreach p : info.get('proto')
|
||||||
extra_src += get_variable(p.underscorify() + '_c')
|
extra_src += get_variable(p.underscorify() + '_c')
|
||||||
extra_src += get_variable(p.underscorify() + '_h')
|
extra_src += get_variable(p.underscorify() + '_client_h')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
|
@ -53,14 +53,15 @@ foreach name, path : protocols
|
|||||||
)
|
)
|
||||||
wlr_files += code
|
wlr_files += code
|
||||||
|
|
||||||
wlr_files += custom_target(
|
server_header = custom_target(
|
||||||
name.underscorify() + '_server_h',
|
name.underscorify() + '_server_h',
|
||||||
input: path,
|
input: path,
|
||||||
output: '@BASENAME@-protocol.h',
|
output: '@BASENAME@-protocol.h',
|
||||||
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
|
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
|
||||||
)
|
)
|
||||||
|
wlr_files += server_header
|
||||||
|
|
||||||
header = custom_target(
|
client_header = custom_target(
|
||||||
name.underscorify() + '_client_h',
|
name.underscorify() + '_client_h',
|
||||||
input: path,
|
input: path,
|
||||||
output: '@BASENAME@-client-protocol.h',
|
output: '@BASENAME@-client-protocol.h',
|
||||||
@ -69,5 +70,6 @@ foreach name, path : protocols
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_variable(name.underscorify() + '_c', code)
|
set_variable(name.underscorify() + '_c', code)
|
||||||
set_variable(name.underscorify() + '_h', header)
|
set_variable(name.underscorify() + '_server_h', server_header)
|
||||||
|
set_variable(name.underscorify() + '_client_h', client_header)
|
||||||
endforeach
|
endforeach
|
||||||
|
Loading…
Reference in New Issue
Block a user