Last active
August 8, 2017 16:35
-
-
Save nyorain/608dd472a69997af65c267cf2808552d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protos = [['xdg-shell', '/usr/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml']] | |
wlscanner = find_program('wayland-scanner', required: false) | |
if wlscanner.found() | |
proto_targets = [] | |
foreach proto : protos | |
code_output = proto[0] + '.c' | |
header_output = protoc[0] + '.h' | |
proto_targets += custom_target( | |
input: proto[1], | |
output: proto[0] + '_target', | |
capture: true, | |
command: [wlscanner, 'code', '@INPUT@', code_output) | |
proto_target += custom_target( | |
input: proto[1], | |
output: proto[0] + '_target', | |
capture: true, | |
command: [wlscanner, 'server_header', '@INPUT@', header_output) | |
endforeach | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment