Merge branch 'upstream/2.30.0' into tizen
[platform/upstream/atk.git] / meson.build
index 9a224ef..59abf5e 100644 (file)
@@ -1,12 +1,12 @@
 project('atk', 'c',
-        version: '2.28.1',
+        version: '2.30.0',
         license: 'LGPLv2.1+',
         default_options: [
           'buildtype=debugoptimized',
           'warning_level=1',
           'c_std=c99',
         ],
-        meson_version : '>= 0.40.1')
+        meson_version : '>= 0.46.0')
 
 cc = meson.get_compiler('c')
 host_system = host_machine.system()
@@ -65,24 +65,17 @@ if get_option('default_library') != 'static'
 endif
 
 # Check all compiler flags
-foreach cflag: test_cflags
-  if cc.has_argument(cflag)
-    common_cflags += [ cflag ]
-  endif
-endforeach
+common_cflags += cc.get_supported_arguments(test_cflags)
 
 # Linker flags
 if host_machine.system() == 'linux'
-  foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
-    if cc.has_argument(ldflag)
-      common_ldflags += [ ldflag ]
-    endif
-  endforeach
+  test_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
+  common_ldflags += cc.get_supported_link_arguments(test_ldflags)
 endif
 
 # Maintain compatibility with autotools on macOS
 if host_machine.system() == 'darwin'
-  common_ldflags += [ '-compatibility_version=1', '-current_version=1.0', ]
+  common_ldflags += [ '-compatibility_version 1', '-current_version 1.0', ]
 endif
 
 # Functions
@@ -130,6 +123,6 @@ subdir('atk')
 subdir('tests')
 subdir('po')
 
-if get_option('enable_docs')
+if get_option('docs')
   subdir('docs')
 endif