| 1 | link_args = cc.get_supported_link_arguments([ |
| 2 | '-fstack-protector-all', |
| 3 | '-fstack-protector-strong', |
| 4 | '-Wl,--add-stdcall-alias', |
| 5 | '-Wl,--enable-stdcall-fixup' |
| 6 | ]) |
| 7 | |
| 8 | qga_vss = shared_module( |
| 9 | 'qga-vss', |
| 10 | ['requester.cpp', 'provider.cpp', 'install.cpp', 'vss-debug.cpp', genh], |
| 11 | name_prefix: '', |
| 12 | cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'], |
| 13 | link_args: link_args, |
| 14 | vs_module_defs: 'qga-vss.def', |
| 15 | dependencies: [ |
| 16 | socket, |
| 17 | cc.find_library('ole32'), |
| 18 | cc.find_library('oleaut32'), |
| 19 | cc.find_library('shlwapi'), |
| 20 | cc.find_library('uuid') |
| 21 | ] |
| 22 | ) |
| 23 | |
| 24 | if midl.found() |
| 25 | gen_tlb = custom_target('gen-tlb', |
| 26 | input: 'qga-vss.idl', |
| 27 | output: 'qga-vss.tlb', |
| 28 | command: [midl, '@INPUT@', '/tlb', '@OUTPUT@']) |
| 29 | else |
| 30 | gen_tlb = custom_target('gen-tlb', |
| 31 | input: 'qga-vss.idl', |
| 32 | output: 'qga-vss.tlb', |
| 33 | command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@']) |
| 34 | endif |
| 35 | |
| 36 | all_qga += [ qga_vss, gen_tlb ] |