mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
build: use dicts instead of get_variable
Closes: https://github.com/swaywm/wlroots/issues/1963
This commit is contained in:
parent
0b882475ad
commit
ab4f642153
3 changed files with 10 additions and 7 deletions
|
@ -16,5 +16,5 @@ client_protos = [
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach proto : client_protos
|
foreach proto : client_protos
|
||||||
wlr_files += get_variable(proto.underscorify() + '_client_h')
|
wlr_files += protocols_client_header[proto]
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -167,7 +167,7 @@ clients = {
|
||||||
foreach name, info : compositors
|
foreach name, info : compositors
|
||||||
extra_src = []
|
extra_src = []
|
||||||
foreach p : info.get('proto', [])
|
foreach p : info.get('proto', [])
|
||||||
extra_src += get_variable(p.underscorify() + '_server_h')
|
extra_src += protocols_server_header[p]
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
|
@ -182,8 +182,8 @@ endforeach
|
||||||
foreach name, info : clients
|
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 += protocols_code[p]
|
||||||
extra_src += get_variable(p.underscorify() + '_client_h')
|
extra_src += protocols_client_header[p]
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
|
|
|
@ -46,6 +46,9 @@ protocols = {
|
||||||
'wlr-virtual-pointer-unstable-v1': 'wlr-virtual-pointer-unstable-v1.xml',
|
'wlr-virtual-pointer-unstable-v1': 'wlr-virtual-pointer-unstable-v1.xml',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protocols_code = {}
|
||||||
|
protocols_server_header = {}
|
||||||
|
protocols_client_header = {}
|
||||||
foreach name, path : protocols
|
foreach name, path : protocols
|
||||||
code = custom_target(
|
code = custom_target(
|
||||||
name.underscorify() + '_c',
|
name.underscorify() + '_c',
|
||||||
|
@ -71,7 +74,7 @@ foreach name, path : protocols
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
set_variable(name.underscorify() + '_c', code)
|
protocols_code += { name: code }
|
||||||
set_variable(name.underscorify() + '_server_h', server_header)
|
protocols_server_header += { name: server_header }
|
||||||
set_variable(name.underscorify() + '_client_h', client_header)
|
protocols_client_header += { name: client_header }
|
||||||
endforeach
|
endforeach
|
||||||
|
|
Loading…
Reference in a new issue