mirror of https://github.com/xemu-project/xemu.git
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:
parent
71bc6dfbe6
commit
1dbb74e86f
|
@ -18,15 +18,18 @@ if add_languages('cpp', required: false)
|
||||||
all_qga += qga_vss
|
all_qga += qga_vss
|
||||||
endif
|
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)
|
midl = find_program('midl', required: false)
|
||||||
|
widl = find_program('widl', required: false)
|
||||||
if midl.found()
|
if midl.found()
|
||||||
gen_tlb = custom_target('gen-tlb',
|
gen_tlb = custom_target('gen-tlb',
|
||||||
input: 'qga-vss.idl',
|
input: 'qga-vss.idl',
|
||||||
output: 'qga-vss.tlb',
|
output: 'qga-vss.tlb',
|
||||||
command: [midl, '@INPUT@', '/tlb', '@OUTPUT@'])
|
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
|
else
|
||||||
gen_tlb = custom_target('gen-tlb',
|
gen_tlb = custom_target('gen-tlb',
|
||||||
input: 'qga-vss.tlb',
|
input: 'qga-vss.tlb',
|
||||||
|
|
Loading…
Reference in New Issue