]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qga/meson.build
meson: remove CONFIG_POSIX and CONFIG_WIN32 from config_targetos
[mirror_qemu.git] / qga / meson.build
index 940a51d55db8b01870f0f56a7b8f44fda1d17322..1113e7c7fae40406c91002d56a40f5514059a8bd 100644 (file)
@@ -67,23 +67,25 @@ qga_ss.add(files(
   'main.c',
   'cutils.c',
 ))
-qga_ss.add(when: 'CONFIG_POSIX', if_true: files(
-  'channel-posix.c',
-  'commands-posix.c',
-  'commands-posix-ssh.c',
-))
-qga_ss.add(when: 'CONFIG_LINUX', if_true: files(
-  'commands-linux.c',
-))
-qga_ss.add(when: 'CONFIG_BSD', if_true: files(
-  'commands-bsd.c',
-))
-qga_ss.add(when: 'CONFIG_WIN32', if_true: files(
-  'channel-win32.c',
-  'commands-win32.c',
-  'service-win32.c',
-  'vss-win32.c'
-))
+if targetos == 'windows'
+  qga_ss.add(files(
+    'channel-win32.c',
+    'commands-win32.c',
+    'service-win32.c',
+    'vss-win32.c'
+  ))
+else
+  qga_ss.add(files(
+    'channel-posix.c',
+    'commands-posix.c',
+    'commands-posix-ssh.c',
+  ))
+  if targetos == 'linux'
+    qga_ss.add(files('commands-linux.c'))
+  elif targetos in bsd_oses
+    qga_ss.add(files('commands-bsd.c'))
+  endif
+endif
 
 qga_ss = qga_ss.apply(config_targetos, strict: false)
 
@@ -140,13 +142,13 @@ if targetos == 'windows'
       qemu_ga_msi_vss = ['-D', 'InstallVss']
       deps += qga_vss
     endif
-    if glib.version() < '2.73.2'
+    if glib.version().version_compare('<2.73.2')
       libpcre = 'libpcre1'
     else
       libpcre = 'libpcre2'
     endif
     qga_msi_version = get_option('qemu_ga_version') == '' \
-      ? project.version() \
+      ? meson.project_version() \
       : get_option('qemu_ga_version')
     qga_msi = custom_target('QGA MSI',
                             input: files('installer/qemu-ga.wxs'),