summaryrefslogtreecommitdiff
path: root/atk
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-20 15:36:44 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-22 13:44:20 +0100
commit6adb5fa877a36014a05a755f1cf12d549c8f0fb3 (patch)
tree629c27f2d96635ba9bb126664314eb1f4e1357c8 /atk
parent1831a7b3e49bdaf206a613d7bdf3a48288b87735 (diff)
downloadatk-6adb5fa877a36014a05a755f1cf12d549c8f0fb3.tar.gz
Add Meson build system
Meson is a meta-build system that has several advantages over Autotools: - faster - simpler to use and understand - portable to various platforms - tailored to the needs of GNOME libraries - well maintained and supported Various other libraries in the GNOME stack have already adopted Meson in parallel, or exclusively, including GTK+. https://bugzilla.gnome.org/show_bug.cgi?id=782871
Diffstat (limited to 'atk')
-rw-r--r--atk/meson.build140
1 files changed, 140 insertions, 0 deletions
diff --git a/atk/meson.build b/atk/meson.build
new file mode 100644
index 0000000..1654d6a
--- /dev/null
+++ b/atk/meson.build
@@ -0,0 +1,140 @@
+atk_sources = [
+ 'atkaction.c',
+ 'atkcomponent.c',
+ 'atkdocument.c',
+ 'atkeditabletext.c',
+ 'atkgobjectaccessible.c',
+ 'atkhyperlink.c',
+ 'atkhyperlinkimpl.c',
+ 'atkhypertext.c',
+ 'atkimage.c',
+ 'atknoopobject.c',
+ 'atknoopobjectfactory.c',
+ 'atkobject.c',
+ 'atkobjectfactory.c',
+ 'atkplug.c',
+ 'atkprivate.c',
+ 'atkrange.c',
+ 'atkregistry.c',
+ 'atkrelation.c',
+ 'atkrelationset.c',
+ 'atkselection.c',
+ 'atksocket.c',
+ 'atkstate.c',
+ 'atkstateset.c',
+ 'atkstreamablecontent.c',
+ 'atktable.c',
+ 'atktablecell.c',
+ 'atktext.c',
+ 'atkutil.c',
+ 'atkmisc.c',
+ 'atkvalue.c',
+ 'atkversion.c',
+ 'atkwindow.c',
+]
+
+atk_headers = [
+ 'atkaction.h',
+ 'atkcomponent.h',
+ 'atkdocument.h',
+ 'atkeditabletext.h',
+ 'atkgobjectaccessible.h',
+ 'atkhyperlink.h',
+ 'atkhyperlinkimpl.h',
+ 'atkhypertext.h',
+ 'atknoopobject.h',
+ 'atknoopobjectfactory.h',
+ 'atkobject.h',
+ 'atkobjectfactory.h',
+ 'atkplug.h',
+ 'atkimage.h',
+ 'atkrange.h',
+ 'atkregistry.h',
+ 'atkrelation.h',
+ 'atkrelationtype.h',
+ 'atkrelationset.h',
+ 'atkselection.h',
+ 'atksocket.h',
+ 'atkstate.h',
+ 'atkstateset.h',
+ 'atkstreamablecontent.h',
+ 'atktable.h',
+ 'atktablecell.h',
+ 'atktext.h',
+ 'atkutil.h',
+ 'atkmisc.h',
+ 'atkvalue.h',
+ 'atkwindow.h',
+]
+
+install_headers(atk_headers, subdir: atk_api_path)
+
+# Features header
+atk_version_conf = configuration_data()
+atk_version_conf.set('ATK_MAJOR_VERSION', atk_major_version)
+atk_version_conf.set('ATK_MINOR_VERSION', atk_minor_version)
+atk_version_conf.set('ATK_MICRO_VERSION', atk_micro_version)
+atk_version_conf.set('ATK_BINARY_AGE', atk_binary_age)
+atk_version_conf.set('ATK_INTERFACE_AGE', atk_interface_age)
+
+configure_file(input: 'atkversion.h.in',
+ output: 'atkversion.h',
+ configuration: atk_version_conf,
+ install: true,
+ install_dir: join_paths(atk_includedir, atk_api_path))
+
+# Marshallers
+atk_marshals = gnome.genmarshal('atkmarshal',
+ sources: 'atkmarshal.list',
+ prefix: 'atk_marshal')
+atk_marshal_h = atk_marshals[1]
+
+# Enumerations for GType
+atk_enums = gnome.mkenums('atk-enum-types',
+ sources: atk_headers,
+ c_template: 'atk-enum-types.c.template',
+ h_template: 'atk-enum-types.h.template',
+ install_dir: join_paths(atk_includedir, atk_api_path),
+ install_header: true)
+atk_enum_h = atk_enums[1]
+
+atk_cflags = [
+ '-DG_LOG_DOMAIN="Atk"',
+ '-DG_LOG_USE_STRUCTURED=1',
+ '-DATK_DISABLE_DEPRECATED',
+ '-DATK_COMPILATION',
+ '-DATK_LOCALEDIR="@0@"'.format(join_paths(atk_datadir, 'locale')),
+]
+
+atk_inc = include_directories('.')
+
+libatk = shared_library('atk-@0@'.format(atk_api_version),
+ sources: atk_sources + atk_enums + atk_marshals,
+ soversion: atk_soversion,
+ install: true,
+ dependencies: gobject_dep,
+ include_directories: [ root_inc, atk_inc ],
+ c_args: common_cflags + atk_cflags,
+ link_args: common_ldflags)
+
+libatk_dep = declare_dependency(link_with: libatk,
+ include_directories: atk_inc,
+ dependencies: gobject_dep,
+ sources: atk_enums)
+
+if not meson.is_cross_build()
+ gnome.generate_gir(libatk,
+ sources: atk_sources + atk_headers + [ atk_enum_h ],
+ namespace: 'Atk',
+ nsversion: atk_api_version,
+ identifier_prefix: 'Atk',
+ symbol_prefix: 'atk',
+ export_packages: 'atk',
+ includes: [ 'GObject-2.0' ],
+ install: true,
+ extra_args: [
+ '--quiet',
+ '--c-include=atk/atk.h',
+ '-DATK_COMPILATION',
+ ])
+endif