Skip to content

Commit 7e1aaec

Browse files
committed
Only generate server headers and code for xdg-dialog-v1 if tests are enabled
1 parent ed1fad2 commit 7e1aaec

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

protocol/meson.build

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ endif
66

77
protocols = [
88
'wlr-layer-shell-unstable-v1.xml',
9-
'xdg-dialog-v1.xml',
109
join_paths(
1110
wayland_protocols.get_variable(pkgconfig: 'pkgdatadir'),
1211
'stable/xdg-shell/xdg-shell.xml'),
1312
]
1413

14+
if get_option('tests')
15+
protocols += 'xdg-dialog-v1.xml'
16+
endif
17+
1518
gen_client_header = generator(prog_wayland_scanner,
1619
output: ['@BASENAME@-client.h'],
1720
arguments: ['-c', 'client-header', '@INPUT@', '@BUILD_DIR@/@BASENAME@-client.h'])
@@ -29,8 +32,10 @@ server_protocol_srcs = []
2932

3033
foreach protocol : protocols
3134
client_header = gen_client_header.process(protocol)
32-
server_header = gen_server_header.process(protocol)
3335
code = gen_private_code.process(protocol)
3436
client_protocol_srcs += [client_header, code]
35-
server_protocol_srcs += [server_header, code]
37+
if get_option('tests')
38+
server_header = gen_server_header.process(protocol)
39+
server_protocol_srcs += [server_header, code]
40+
endif
3641
endforeach

0 commit comments

Comments
 (0)