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