mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/vulkan: check vulkan-headers dependency
There's no pkg-config file we can check for sadly, so check vulkan/vulkan.h as a fallback. Closes: https://github.com/swaywm/wlroots/issues/3272
This commit is contained in:
		
							parent
							
								
									f7ea33da0a
								
							
						
					
					
						commit
						36cf387427
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
					@ -10,11 +10,20 @@ dep_vulkan = dependency('vulkan',
 | 
				
			||||||
	required: 'vulkan' in renderers,
 | 
						required: 'vulkan' in renderers,
 | 
				
			||||||
	not_found_message: '\n'.join(msg).format('vulkan')
 | 
						not_found_message: '\n'.join(msg).format('vulkan')
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					 | 
				
			||||||
if not dep_vulkan.found()
 | 
					if not dep_vulkan.found()
 | 
				
			||||||
	subdir_done()
 | 
						subdir_done()
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Vulkan headers are installed separately from the loader (which ships the
 | 
				
			||||||
 | 
					# pkg-config file)
 | 
				
			||||||
 | 
					if not cc.check_header('vulkan/vulkan.h', dependencies: dep_vulkan)
 | 
				
			||||||
 | 
						if 'vulkan' in renderers
 | 
				
			||||||
 | 
							error('\n'.join(msg).format('vulkan-headers'))
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							subdir_done()
 | 
				
			||||||
 | 
						endif
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
glslang = find_program('glslangValidator', native: true, required: false)
 | 
					glslang = find_program('glslangValidator', native: true, required: false)
 | 
				
			||||||
if not glslang.found()
 | 
					if not glslang.found()
 | 
				
			||||||
	if 'vulkan' in renderers
 | 
						if 'vulkan' in renderers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue