Skip to content

Commit

Permalink
qga/vss-win32: require widl/midl, remove pre-built TLB file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco authored and bonzini committed Feb 16, 2022
1 parent 6fab7da commit ab57285
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions meson.build
Expand Up @@ -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')

Expand Down
2 changes: 2 additions & 0 deletions qga/meson.build
Expand Up @@ -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 = []
Expand Down
9 changes: 1 addition & 8 deletions qga/vss-win32/meson.build
Expand Up @@ -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
Binary file removed qga/vss-win32/qga-vss.tlb
Binary file not shown.

0 comments on commit ab57285

Please sign in to comment.