qga/vss-win32: require widl/midl, remove pre-built TLB file
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 1 Feb 2022 08:55:21 +0000 (12:55 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Feb 2022 09:35:54 +0000 (10:35 +0100)
There are no good reason anymore to keep a pre-built file in the repository.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
meson.build
qga/meson.build
qga/vss-win32/meson.build
qga/vss-win32/qga-vss.tlb [deleted file]

index 2818b93d324a0ef234591c4081800c906586f2f6..8d9898c5c3a6d3ef33236b2e88de925348cc6a20 100644 (file)
@@ -307,8 +307,12 @@ iokit = []
 emulator_link_args = []
 nvmm =not_found
 hvf = not_found
+midl = not_found
+widl = not_found
 host_dsosuf = '.so'
 if targetos == 'windows'
+  midl = find_program('midl', required: false)
+  widl = find_program('widl', required: false)
   socket = cc.find_library('ws2_32')
   winmm = cc.find_library('winmm')
 
index a32c141dd0dc94fb8449b6ae42c6d6a1d0e848f1..4ac781cb332a3c44a06a990b5c6a8eb14281c701 100644 (file)
@@ -20,6 +20,8 @@ have_qga_vss = get_option('qga_vss') \
     $ scripts/extract-vsssdk-headers setup.exe
     The headers are extracted in the directory 'inc/win2003'.
     Then run configure with: --extra-cxxflags="-isystem /path/to/vss/inc/win2003"''') \
+  .require(midl.found() or widl.found(),
+           error_message: 'VSS support requires midl or widl') \
   .allowed()
 
 all_qga = []
index 8d4c5708d8069435562bfda0ddea08b2e8f62729..c064a4e245386489db6aeb74847c5afccc299497 100644 (file)
@@ -25,21 +25,14 @@ qga_vss = shared_module(
 
 all_qga += qga_vss
 
-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()
+else
   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',
-                          output: 'qga-vss.tlb',
-                          command: ['cp', '@INPUT@', '@OUTPUT@'])
 endif
diff --git a/qga/vss-win32/qga-vss.tlb b/qga/vss-win32/qga-vss.tlb
deleted file mode 100644 (file)
index 226452a..0000000
Binary files a/qga/vss-win32/qga-vss.tlb and /dev/null differ