include/qemu/osdep.h: Move system includes to top
[qemu/ar7.git] / qga / vss-win32 / meson.build
blob90825edef334ea2dc261c8444cdca23e551c95dd
1 if add_languages('cpp', required: false)
2   glib_dynamic = dependency('glib-2.0', static: false)
3   link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
4                                                '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
6   qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
7                 name_prefix: '',
8                 cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
9                 link_args: link_args,
10                 vs_module_defs: 'qga-vss.def',
11                 dependencies: [glib_dynamic, socket,
12                                cc.find_library('ole32'),
13                                cc.find_library('oleaut32'),
14                                cc.find_library('shlwapi'),
15                                cc.find_library('uuid'),
16                                cc.find_library('intl')])
18   all_qga += qga_vss
19 endif
21 # rules to build qga-vss.tlb
22 # Currently, only native build is supported because building .tlb
23 # (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++).
24 midl = find_program('midl', required: false)
25 if midl.found()
26   gen_tlb = custom_target('gen-tlb',
27                           input: 'qga-vss.idl',
28                           output: 'qga-vss.tlb',
29                           command: [midl, '-tlb', '-I' + config_host['WIN_SDK'],
30                                      '@INPUT@', '@OUTPUT@'])
31 else
32   gen_tlb = custom_target('gen-tlb',
33                           input: 'qga-vss.tlb',
34                           output: 'qga-vss.tlb',
35                           command: ['cp', '@INPUT@', '@OUTPUT@'])
36 endif