aboutsummaryrefslogtreecommitdiff
path: root/qga/vss-win32/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-01 12:53:15 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-21 10:35:53 +0100
commit1dbb74e86f15116a72996bf9614baf29a0a43b57 (patch)
tree14060d56d28c0fa9accf0f98479237add3690e70 /qga/vss-win32/meson.build
parent71bc6dfbe6c0403389908edab073e18646054560 (diff)
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>
Diffstat (limited to 'qga/vss-win32/meson.build')
-rw-r--r--qga/vss-win32/meson.build9
1 files changed, 6 insertions, 3 deletions
diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
index 78bdf5e74a..8f3aff5fe3 100644
--- a/qga/vss-win32/meson.build
+++ b/qga/vss-win32/meson.build
@@ -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',