qga/vss-win32: use widl if available
widl from mingw64-tools and wine can compile a TLB file. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
		
				
					committed by
					
						
						Paolo Bonzini
					
				
			
			
				
	
			
			
			
						parent
						
							71bc6dfbe6
						
					
				
				
					commit
					1dbb74e86f
				
			@@ -18,15 +18,18 @@ if add_languages('cpp', required: false)
 | 
			
		||||
  all_qga += qga_vss
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# rules to build qga-vss.tlb
 | 
			
		||||
# Currently, only native build is supported because building .tlb
 | 
			
		||||
# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++).
 | 
			
		||||
midl = find_program('midl', required: false)
 | 
			
		||||
widl = find_program('widl', required: false)
 | 
			
		||||
if midl.found()
 | 
			
		||||
  gen_tlb = custom_target('gen-tlb',
 | 
			
		||||
                          input: 'qga-vss.idl',
 | 
			
		||||
                          output: 'qga-vss.tlb',
 | 
			
		||||
                          command: [midl, '@INPUT@', '/tlb', '@OUTPUT@'])
 | 
			
		||||
elif widl.found()
 | 
			
		||||
  gen_tlb = custom_target('gen-tlb',
 | 
			
		||||
                          input: 'qga-vss.idl',
 | 
			
		||||
                          output: 'qga-vss.tlb',
 | 
			
		||||
                          command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@'])
 | 
			
		||||
else
 | 
			
		||||
  gen_tlb = custom_target('gen-tlb',
 | 
			
		||||
                          input: 'qga-vss.tlb',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user