Release 2.25.90
[platform/upstream/atk.git] / atk / meson.build
1 atk_sources = [
2   'atkaction.c',
3   'atkcomponent.c',
4   'atkdocument.c',
5   'atkeditabletext.c',
6   'atkgobjectaccessible.c',
7   'atkhyperlink.c',
8   'atkhyperlinkimpl.c',
9   'atkhypertext.c',
10   'atkimage.c',
11   'atknoopobject.c',
12   'atknoopobjectfactory.c',
13   'atkobject.c',
14   'atkobjectfactory.c',
15   'atkplug.c',
16   'atkprivate.c',
17   'atkrange.c',
18   'atkregistry.c',
19   'atkrelation.c',
20   'atkrelationset.c',
21   'atkselection.c',
22   'atksocket.c',
23   'atkstate.c',
24   'atkstateset.c',
25   'atkstreamablecontent.c',
26   'atktable.c',
27   'atktablecell.c',
28   'atktext.c',
29   'atkutil.c',
30   'atkmisc.c',
31   'atkvalue.c',
32   'atkversion.c',
33   'atkwindow.c',
34 ]
35
36 atk_headers = [
37   'atk.h',
38   'atkaction.h',
39   'atkcomponent.h',
40   'atkdocument.h',
41   'atkeditabletext.h',
42   'atkgobjectaccessible.h',
43   'atkhyperlink.h',
44   'atkhyperlinkimpl.h',
45   'atkhypertext.h',
46   'atknoopobject.h',
47   'atknoopobjectfactory.h',
48   'atkobject.h',
49   'atkobjectfactory.h',
50   'atkplug.h',
51   'atkimage.h',
52   'atkrange.h',
53   'atkregistry.h',
54   'atkrelation.h',
55   'atkrelationtype.h',
56   'atkrelationset.h',
57   'atkselection.h',
58   'atksocket.h',
59   'atkstate.h',
60   'atkstateset.h',
61   'atkstreamablecontent.h',
62   'atktable.h',
63   'atktablecell.h',
64   'atktext.h',
65   'atkutil.h',
66   'atkmisc.h',
67   'atkvalue.h',
68   'atkwindow.h',
69 ]
70
71 install_headers(atk_headers, subdir: atk_api_path)
72
73 # Features header
74 atk_version_conf = configuration_data()
75 atk_version_conf.set('ATK_MAJOR_VERSION', atk_major_version)
76 atk_version_conf.set('ATK_MINOR_VERSION', atk_minor_version)
77 atk_version_conf.set('ATK_MICRO_VERSION', atk_micro_version)
78 atk_version_conf.set('ATK_BINARY_AGE', atk_binary_age)
79 atk_version_conf.set('ATK_INTERFACE_AGE', atk_interface_age)
80
81 atk_version_h = configure_file(input: 'atkversion.h.in',
82                output: 'atkversion.h',
83                configuration: atk_version_conf,
84                install: true,
85                install_dir: join_paths(atk_includedir, atk_api_path))
86
87 # Marshallers
88 atk_marshals = gnome.genmarshal('atkmarshal',
89                                 sources: 'atkmarshal.list',
90                                 prefix: 'atk_marshal')
91 atk_marshal_h = atk_marshals[1]
92
93 # Enumerations for GType
94 atk_enums = gnome.mkenums('atk-enum-types',
95                           sources: atk_headers,
96                           c_template: 'atk-enum-types.c.template',
97                           h_template: 'atk-enum-types.h.template',
98                           install_dir: join_paths(atk_includedir, atk_api_path),
99                           install_header: true)
100 atk_enum_h = atk_enums[1]
101
102 atk_cflags = [
103   '-DG_LOG_DOMAIN="Atk"',
104   '-DG_LOG_USE_STRUCTURED=1',
105   '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
106   '-DATK_DISABLE_DEPRECATION_WARNINGS',
107   '-DATK_COMPILATION',
108   '-DATK_LOCALEDIR="@0@"'.format(join_paths(atk_datadir, 'locale')),
109 ]
110
111 atk_inc = include_directories('.')
112
113 libatk = shared_library('atk-@0@'.format(atk_api_version),
114                         sources: atk_sources + atk_enums + atk_marshals,
115                         soversion: atk_soversion,
116                         version: atk_libversion,
117                         install: true,
118                         dependencies: gobject_dep,
119                         include_directories: [ root_inc, atk_inc ],
120                         c_args: common_cflags + atk_cflags,
121                         link_args: common_ldflags)
122
123 libatk_dep = declare_dependency(link_with: libatk,
124                                 include_directories: atk_inc,
125                                 dependencies: gobject_dep,
126                                 sources: atk_enum_h)
127
128 if not meson.is_cross_build()
129   gnome.generate_gir(libatk,
130                      sources: atk_sources + atk_headers + [ atk_enum_h ] + [ atk_version_h ],
131                      namespace: 'Atk',
132                      nsversion: atk_api_version,
133                      identifier_prefix: 'Atk',
134                      symbol_prefix: 'atk',
135                      export_packages: 'atk',
136                      includes: [ 'GObject-2.0' ],
137                      install: true,
138                      extra_args: [
139                        '--quiet',
140                        '--c-include=atk/atk.h',
141                        '-DATK_COMPILATION',
142                      ])
143 endif