2 meson_version: '>=0.56.0',
4 license: 'LGPL-2.1-or-later'
9 'homepage': 'http://adg.entidi.com/',
10 'tracker': 'https://track.entidi.com/project/view/2/',
14 # How to handle LT versions (current:revision:age):
15 # - If the library source code has changed at all since the last
16 # update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
17 # - If any interfaces have been added, removed, or changed since the
18 # last update, increment current, and set revision to 0.
19 # - If any interfaces have been added since the last public release,
21 # - If any interfaces have been removed or changed since the last
22 # public release, then set age to 0.
31 cc = meson.get_compiler('c')
32 gnome = import('gnome')
34 pkgconfig = import('pkgconfig')
35 pkgdir = meson.project_name() + '-' + metadata['api']
36 prefix = get_option('prefix')
37 datadir = join_paths(prefix, get_option('datadir'))
38 pkgdatadir = join_paths(datadir, pkgdir)
39 localedir = join_paths(prefix, get_option('localedir'))
40 includedir = join_paths(prefix, get_option('includedir'), pkgdir)
43 m_dep = cc.find_library('m', required: false)
45 # G_ADD_PRIVATE macro required
46 gobject_dep = dependency('gobject-2.0', version: '>=2.38.0')
48 # cairo_scaled_font_text_to_glyphs() API required
49 cairo_dep = dependency('cairo', version: '>=1.7.4')
52 cairogobject_dep = dependency('cairo-gobject')
54 # Cairo support in Pango required
55 pangocairo_dep = dependency('pangocairo', version: '>=1.10.0',
56 required: get_option('pango'))
58 # Lookup which GTK package to use
59 gtk = get_option('gtk')
64 # First stable release
65 gtk_dep = dependency('gtk+-3.0', version: '>= 3.0.0',
66 required: gtk == 'gtk3')
68 use_gtk2 = gtk == 'gtk2' or not gtk_dep.found()
70 # gtk_widget_get_allocation() API required
71 gtk_dep = dependency('gtk+-2.0', version: '>=2.18.0')
75 # Both "check" and "yes" mean gladeui autodetection,
76 # but "yes" will fail if gladeui is not found
77 catalogdir = get_option('catalogdir')
78 if catalogdir == 'yes' or catalogdir == 'check'
79 glade_dep = dependency('gladeui-2.0', required: false)
80 if not glade_dep.found()
81 glade_dep = dependency('gladeui-1.0', required: catalogdir == 'yes')
84 catalogdir = glade_dep.get_variable(pkgconfig: 'catalogdir')
88 elif catalogdir == 'no'
89 # Both 'no' and '' mean "Do not install catalogs"
93 # Support for introspection annotations required
94 gtkdoc_dep = dependency('gtk-doc', required: get_option('gtk-doc'),
97 gtkdocdir = get_option('gtkdocdir')
99 gtkdocdir = join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc', 'html')
102 # First stable release
103 introspection_dep = dependency('gobject-introspection-1.0', version: '>=1.0.0',
104 required: get_option('introspection'))
106 # Check if GLib supports the testing framework
107 testing = dependency('glib-2.0', version: '>=2.16.0',
108 required: get_option('tests'))
116 if gtkdoc_dep.found()
125 'CPML library to use':
126 'internal (cpml-@0@ @1@)'.format(metadata['api'], meson.project_version()),
127 'Use pango for text':
128 pangocairo_dep.found() ?
129 'yes (@0@ @1@)'.format(pangocairo_dep.name(), pangocairo_dep.version()) :
130 'no (use cairo toy API)',
133 'yes (@0@ @1@)'.format(gtk_dep.name(), gtk_dep.version()) :
135 'Install glade catalogs':
136 catalogdir == '' ? 'no' : 'yes, install into @0@'.format(catalogdir),
137 'Build API reference':
139 'yes (@0@ @1@), install into @2@'.
140 format(gtkdoc_dep.name(), gtkdoc_dep.version(), gtkdocdir) :
142 'GObject instrospection':
143 introspection_dep.found() ?
144 'yes (@0@ @1@)'.format(introspection_dep.name(), introspection_dep.version()) :
146 'Test framework support':
147 testing.found() ? 'yes' : 'no'