1project( 2 'mate-desktop', 3 'c', 4 version: '1.25.0', 5 license: [ 'GPL-2', 'FDL-1.1', 'LGPL-2' ], 6) 7 8matedt_version = meson.project_version() 9version_array = matedt_version.split('.') 10mate_major_version = version_array[0].to_int() 11mate_minor_version = version_array[0].to_int() 12mate_micro_version = version_array[0].to_int() 13mate_platform = 1 14mate_minor = 24 15mate_micro = 0 16 17matedt_api_version = '2.0' 18matedt_api_name = '@0@-@1@'.format(meson.project_name(), matedt_api_version) 19 20matedt_gir_ns = 'MateDesktop' 21matedt_gir_version = '2.0' 22 23matedt_gettext_package = meson.project_name() 24 25matedt_prefix = get_option('prefix') 26matedt_bindir = join_paths(matedt_prefix, get_option('bindir')) 27matedt_datadir = join_paths(matedt_prefix, get_option('datadir')) 28matedt_includedir = join_paths(matedt_prefix, get_option('includedir')) 29matedt_libdir = join_paths(matedt_prefix, get_option('libdir')) 30matedt_libexecdir = join_paths(matedt_prefix, get_option('libexecdir')) 31matedt_localedir = join_paths(matedt_prefix, get_option('localedir')) 32matedt_mandir = join_paths(matedt_prefix, get_option('mandir')) 33 34matedt_pkgdatadir = join_paths(matedt_datadir, 'libmate-desktop') 35 36# options 37enable_gir = get_option('introspection') 38enable_gtk_doc = get_option('gtk-doc') 39enable_startup_notification = get_option('startup-notification') 40 41# Before making a release, the LT_VERSION string should be modified. 42# The string is of the form C:R:A. 43# - If interfaces have been changed or added, but binary compatibility has 44# been preserved, change to C+1:0:A+1 45# - If binary compatibility has been broken (eg removed or changed interfaces) 46# change to C+1:0:0 47# - If the interface is the same as the previous version, change to C:R+1:A 48current = 17 49revision = 4 50age = 1 51 52libversion = '@0@.@1@.@2@'.format(current, age, revision) 53 54cc = meson.get_compiler('c') 55nm = find_program('nm') 56 57config_h = configuration_data() 58 59# i18n 60config_h.set_quoted('GETTEXT_PACKAGE', matedt_gettext_package) 61config_h.set_quoted('LOCALEDIR', matedt_localedir) 62 63common_flags = [ 64 '-DHAVE_CONFIG_H', 65 '-I' + meson.build_root(), 66 '-DPACKAGE_VERSION="@0@"'.format(matedt_version), 67] 68 69add_project_arguments(common_flags, language: 'c') 70 71gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.0') 72m_dep = cc.find_library('m', required: false) 73dconf_dep = dependency('dconf', version: '>= 0.13.4') 74x11_dep = dependency('x11', required: true) 75randr_dep = dependency('xrandr', version: '>= 1.3', required: false) 76config_h.set('HAVE_RANDR', randr_dep.found()) 77iso_codes = dependency('iso-codes') 78iso_codes_prefix = iso_codes.get_pkgconfig_variable('prefix') 79libmdt_dep = [ 80 dependency('gdk-pixbuf-2.0'), 81 dependency('gobject-2.0'), 82 dependency('glib-2.0', version: '>= 2.50.0'), 83 dependency('gio-2.0', version: '>= 2.26.0'), 84 dependency('libstartup-notification-1.0', version: '>= 0.5', 85 required: enable_startup_notification ), 86 randr_dep, 87 iso_codes, 88] 89 90gnome = import('gnome') 91i18n = import('i18n') 92pkg = import('pkgconfig') 93 94po_dir = join_paths(meson.source_root(), 'po') 95 96top_inc = include_directories('.') 97 98subdir('icons') 99subdir('libmate-desktop') 100subdir('man') 101if enable_gtk_doc 102 subdir('docs/reference/mate-desktop') 103endif 104subdir('po') 105subdir('tools') 106subdir('schemas') 107if get_option('mate-about') 108 subdir('mate-about') 109endif 110 111configure_file( 112 output: 'config.h', 113 configuration: config_h, 114) 115 116meson.add_install_script('utils/post_install.py') 117 118test('libmate-desktop symbols check', 119 find_program('abi-check'), 120 env: [ 121 'LIB=@0@'.format(libmate_desktop.full_path()), 122 'NM=@0@'.format(nm.path()), 123 'ABI=@0@/libmate-desktop/mate-desktop.abi'.format(meson.source_root()) 124 ] 125) 126