aboutsummaryrefslogtreecommitdiff
path: root/qga/vss-win32/meson.build
blob: 8f3aff5fe3b9dda755f293cf9e33f744e07b120c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
if add_languages('cpp', required: false)
  glib_dynamic = dependency('glib-2.0', static: false)
  link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
                                               '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])

  qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
                name_prefix: '',
                cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
                link_args: link_args,
                vs_module_defs: 'qga-vss.def',
                dependencies: [glib_dynamic, socket,
                               cc.find_library('ole32'),
                               cc.find_library('oleaut32'),
                               cc.find_library('shlwapi'),
                               cc.find_library('uuid'),
                               cc.find_library('intl')])

  all_qga += qga_vss
endif

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',
                          output: 'qga-vss.tlb',
                          command: ['cp', '@INPUT@', '@OUTPUT@'])
endif