[gnome-contacts] meson: Only add --disable-since-check if vala > 0.31



commit e83dd7bfdb8db71969f2e4be8078cf7e0e9144a5
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Jun 5 10:38:12 2020 +0200

    meson: Only add --disable-since-check if vala > 0.31

 meson.build | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 036f8cf..9005484 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,7 @@ else
 endif
 
 # Common variables
+valac = meson.get_compiler('vala')
 config_h_dir = include_directories('.')
 contacts_prefix = get_option('prefix')
 locale_dir = contacts_prefix / get_option('localedir')
@@ -75,10 +76,12 @@ if not libhandy.found()
 
   # We need to add this, since Vala queries the pkgconfig version on its own
   # and will error out if that is lower then required one
-  add_project_arguments(
-    [ '--disable-since-check' ],
-    language: 'vala'
-  )
+  if valac.version().version_compare('>= 0.31.1')
+    add_project_arguments(
+      [ '--disable-since-check' ],
+      language: 'vala'
+    )
+  endif
 
   libhandy_vapidir = meson.build_root() / 'subprojects' / 'libhandy' / 'src'
 else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]