Version 2.36.0
[platform/upstream/atk.git] / meson.build
index 59abf5e..3b12d47 100644 (file)
@@ -1,5 +1,5 @@
 project('atk', 'c',
-        version: '2.30.0',
+        version: '2.36.0',
         license: 'LGPLv2.1+',
         default_options: [
           'buildtype=debugoptimized',
@@ -20,7 +20,8 @@ atk_interface_age = 1
 atk_binary_age = 10000 * atk_major_version + 100 * atk_minor_version + 10 + atk_micro_version
 
 atk_api_version = '1.0'
-atk_api_path = 'atk-@0@/atk'.format(atk_api_version)
+atk_api_name = 'atk-@0@'.format(atk_api_version)
+atk_api_path = '@0@/atk'.format(atk_api_name)
 
 atk_prefix = get_option('prefix')
 atk_libdir = join_paths(atk_prefix, get_option('libdir'))
@@ -36,12 +37,14 @@ atk_conf.set_quoted('GETTEXT_PACKAGE', 'atk10')
 
 # Maintain version scheme with libtool
 atk_soversion = 0
-atk_libversion = '@0@.@1@.@2@'.format(atk_soversion, (atk_binary_age - atk_interface_age), atk_interface_age)
+current = atk_binary_age - atk_interface_age
+atk_libversion = '@0@.@1@.@2@'.format(atk_soversion, current, atk_interface_age)
+darwin_versions = ['@0@'.format(current + 1), '@0@.@1@'.format(current + 1, atk_interface_age)]
 
 add_project_arguments([ '-DG_DISABLE_SINGLE_INCLUDES', '-DATK_DISABLE_SINGLE_INCLUDES' ], language: 'c')
 
 if cc.get_id() == 'msvc'
-  add_project_arguments([ '-FImsvc_recommended_pragmas.h' ], language: 'c')
+  add_project_arguments(cc.get_supported_arguments(['-FImsvc_recommended_pragmas.h', '-utf-8']), language: 'c')
 endif
 
 # Compiler and linker flags
@@ -75,7 +78,7 @@ 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', darwin_versions[0], '-current_version', darwin_versions[1]]
 endif
 
 # Functions
@@ -90,34 +93,21 @@ foreach f: checked_funcs
 endforeach
 
 # Dependencies
-gobject_req_version = '>= 2.31.2'
-
-gobject_dep = dependency('gobject-2.0', version: gobject_req_version)
-
-# Compat variables for pkgconfig
-pkgconf = configuration_data()
-pkgconf.set('prefix', atk_prefix)
-pkgconf.set('exec_prefix', atk_prefix)
-pkgconf.set('libdir', atk_libdir)
-pkgconf.set('includedir', atk_includedir)
-pkgconf.set('VERSION', meson.project_version())
-pkgconf.set('ATK_API_VERSION', atk_api_version)
-pkgconf.set('srcdir', '.')
-
-foreach pkg: [ 'atk.pc', ]
-  configure_file(input: pkg + '.in',
-                 output: pkg,
-                 configuration: pkgconf,
-                 install: true,
-                 install_dir: join_paths(atk_libdir, 'pkgconfig'))
-endforeach
+glib_req_version = '>= 2.38.0'
+
+glib_dep = [dependency('glib-2.0', version: glib_req_version,
+                          fallback : ['glib', 'libglib_dep']),
+            dependency('gobject-2.0', version: glib_req_version,
+                          fallback : ['glib', 'libgobject_dep'])]
 
+pkgconfig = import('pkgconfig')
 gnome = import('gnome')
 
 # Internal configuration header
 configure_file(output: 'config.h', configuration: atk_conf)
 
 root_inc = include_directories('.')
+atk_inc = include_directories('atk')
 
 subdir('atk')
 subdir('tests')