4 'qga-qapi-emit-events.c',
5 'qga-qapi-emit-events.h',
8 'qga-qapi-init-commands.c',
9 'qga-qapi-init-commands.h',
10 'qga-qapi-introspect.c',
11 'qga-qapi-introspect.h',
18 qga_qapi_files = custom_target('QGA QAPI files',
19 output: qga_qapi_outputs,
20 input: 'qapi-schema.json',
21 command: [ qapi_gen, '-o', 'qga', '-p', 'qga-', '@INPUT0@' ],
22 depend_files: qapi_gen_depends)
24 qga_ss = ss.source_set()
25 qga_ss.add(qga_qapi_files.to_list())
28 'guest-agent-command-state.c',
31 qga_ss.add(when: 'CONFIG_POSIX', if_true: files(
34 'commands-posix-ssh.c',
36 qga_ss.add(when: 'CONFIG_WIN32', if_true: files(
43 qga_ss = qga_ss.apply(config_host, strict: false)
45 qga = executable('qemu-ga', qga_ss.sources(),
46 link_args: config_host['LIBS_QGA'].split(),
47 dependencies: [qemuutil, libudev],
51 if targetos == 'windows'
52 if 'CONFIG_QGA_VSS' in config_host
58 wixl = find_program('wixl', required: false)
61 if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host
64 qga_msi = custom_target('QGA MSI',
65 input: files('installer/qemu-ga.wxs'),
66 output: 'qemu-ga-@0@.msi'.format(config_host['ARCH']),
70 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
71 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
72 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
73 'BUILD_DIR=' + meson.build_root(),
74 wixl, '-o', '@OUTPUT0@', '@INPUT0@',
75 config_host['QEMU_GA_MSI_ARCH'].split(),
76 config_host['QEMU_GA_MSI_WITH_VSS'].split(),
77 config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
80 alias_target('msi', qga_msi)
83 install_subdir('run', install_dir: get_option('localstatedir'))
86 alias_target('qemu-ga', all_qga)
88 test_env = environment()
89 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
90 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
92 # disable qga-ssh-test for now. glib's G_TEST_OPTION_ISOLATE_DIRS triggers
93 # the leak detector in build-oss-fuzz Gitlab CI test. we should re-enable
94 # this when an alternative is implemented or when the underlying glib
95 # issue is identified/fix
96 #if 'CONFIG_POSIX' in config_host
98 srcs = [files('commands-posix-ssh.c')]
100 foreach output: qga_qapi_outputs
101 if output.startswith('qga-qapi-types') or output.startswith('qga-qapi-visit')
102 srcs += qga_qapi_files[i]
106 qga_ssh_test = executable('qga-ssh-test', srcs,
107 dependencies: [qemuutil],
108 c_args: ['-DQGA_BUILD_UNIT_TEST'])
113 suite: ['unit', 'qga'])