| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wayland_scanner = find_program('wayland-scanner')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wayland_scanner_server = generator(
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   wayland_scanner,
 | 
					
						
							|  |  |  |   output: '@BASENAME@-protocol.h',
 | 
					
						
							|  |  |  |   arguments: ['server-header', '@INPUT@', '@OUTPUT@'],
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wayland_scanner_code = generator(
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   wayland_scanner,
 | 
					
						
							|  |  |  |   output: '@BASENAME@-protocol.c',
 | 
					
						
							|  |  |  |   arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wayland_scanner_client = generator(
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   wayland_scanner,
 | 
					
						
							|  |  |  |   output: '@BASENAME@-client-protocol.h',
 | 
					
						
							|  |  |  |   arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | protocols = [
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
 | 
					
						
							|  |  |  |   [wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
 | 
					
						
							|  |  |  |   [wl_protocol_dir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'],
 | 
					
						
							|  |  |  |   [wl_protocol_dir, 'unstable/primary-selection/primary-selection-unstable-v1.xml'],
 | 
					
						
							|  |  |  |   [wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml'],
 | 
					
						
							| 
									
										
										
										
											2020-03-15 06:05:58 -04:00
										 |  |  |   [wl_protocol_dir, 'unstable/xdg-output/xdg-output-unstable-v1.xml'],
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   'wlr-gamma-control-unstable-v1.xml',
 | 
					
						
							|  |  |  |   'idle.xml',
 | 
					
						
							|  |  |  |   'wlr-screencopy-unstable-v1.xml',
 | 
					
						
							|  |  |  |   'wlr-layer-shell-unstable-v1.xml',
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | client_protocols = [
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
 | 
					
						
							|  |  |  |   [wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
 | 
					
						
							|  |  |  |   'idle.xml',
 | 
					
						
							|  |  |  |   'wlr-screencopy-unstable-v1.xml',
 | 
					
						
							|  |  |  |   'wlr-layer-shell-unstable-v1.xml',
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wl_protos_src = []
 | 
					
						
							|  |  |  | wl_protos_headers = []
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach p : protocols
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   xml = join_paths(p)
 | 
					
						
							|  |  |  |   wl_protos_src += wayland_scanner_code.process(xml)
 | 
					
						
							|  |  |  |   wl_protos_headers += wayland_scanner_server.process(xml)
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach p : client_protocols
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   xml = join_paths(p)
 | 
					
						
							|  |  |  |   wl_protos_headers += wayland_scanner_client.process(xml)
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | lib_wl_protos = static_library('wl_protos', wl_protos_src + wl_protos_headers,
 | 
					
						
							| 
									
										
										
										
											2020-02-29 12:16:50 -05:00
										 |  |  |   dependencies: [wayland_server]) # for the include directory
 | 
					
						
							| 
									
										
										
										
											2018-06-15 13:16:15 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | wlr_protos = declare_dependency(
 | 
					
						
							| 
									
										
										
										
											2020-02-28 10:52:45 -05:00
										 |  |  |   link_with: lib_wl_protos,
 | 
					
						
							|  |  |  |   sources: wl_protos_headers,
 | 
					
						
							| 
									
										
										
										
											2019-06-19 17:51:45 -04:00
										 |  |  | )
 |