aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-21 15:19:24 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-21 15:26:45 +0200
commitab4f6421538a5fc4d539f638018aaf8b35a1f549 (patch)
tree92dd330265237d73e8775bf882af185daf9e6d46
parent0b882475adb07cdc96fe4a585819b28b102a2b81 (diff)
build: use dicts instead of get_variable
Closes: https://github.com/swaywm/wlroots/issues/1963
-rw-r--r--backend/wayland/meson.build2
-rw-r--r--examples/meson.build6
-rw-r--r--protocol/meson.build9
3 files changed, 10 insertions, 7 deletions
diff --git a/backend/wayland/meson.build b/backend/wayland/meson.build
index a9692164..d23f114e 100644
--- a/backend/wayland/meson.build
+++ b/backend/wayland/meson.build
@@ -16,5 +16,5 @@ client_protos = [
]
foreach proto : client_protos
- wlr_files += get_variable(proto.underscorify() + '_client_h')
+ wlr_files += protocols_client_header[proto]
endforeach
diff --git a/examples/meson.build b/examples/meson.build
index 3ff27d1f..7a64da46 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -167,7 +167,7 @@ clients = {
foreach name, info : compositors
extra_src = []
foreach p : info.get('proto', [])
- extra_src += get_variable(p.underscorify() + '_server_h')
+ extra_src += protocols_server_header[p]
endforeach
executable(
@@ -182,8 +182,8 @@ endforeach
foreach name, info : clients
extra_src = []
foreach p : info.get('proto')
- extra_src += get_variable(p.underscorify() + '_c')
- extra_src += get_variable(p.underscorify() + '_client_h')
+ extra_src += protocols_code[p]
+ extra_src += protocols_client_header[p]
endforeach
executable(
diff --git a/protocol/meson.build b/protocol/meson.build
index 6275103a..1b90b4f0 100644
--- a/protocol/meson.build
+++ b/protocol/meson.build
@@ -46,6 +46,9 @@ protocols = {
'wlr-virtual-pointer-unstable-v1': 'wlr-virtual-pointer-unstable-v1.xml',
}
+protocols_code = {}
+protocols_server_header = {}
+protocols_client_header = {}
foreach name, path : protocols
code = custom_target(
name.underscorify() + '_c',
@@ -71,7 +74,7 @@ foreach name, path : protocols
build_by_default: false,
)
- set_variable(name.underscorify() + '_c', code)
- set_variable(name.underscorify() + '_server_h', server_header)
- set_variable(name.underscorify() + '_client_h', client_header)
+ protocols_code += { name: code }
+ protocols_server_header += { name: server_header }
+ protocols_client_header += { name: client_header }
endforeach