2019-12-02 23:07:01 +00:00
|
|
|
project('gnome-extensions-tool', 'c',
|
2021-09-01 23:39:29 +00:00
|
|
|
version: '41.rc',
|
2020-03-05 14:35:48 +00:00
|
|
|
meson_version: '>= 0.53.0',
|
2019-12-02 23:07:01 +00:00
|
|
|
license: 'GPLv2+'
|
|
|
|
)
|
|
|
|
|
|
|
|
gio_req = '>= 2.56.0'
|
|
|
|
|
2020-12-15 18:23:14 +00:00
|
|
|
fs = import('fs')
|
2019-12-02 23:07:01 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
i18n = import('i18n')
|
|
|
|
|
2020-03-05 13:28:21 +00:00
|
|
|
if meson.is_subproject()
|
|
|
|
package_name = get_option('package_name')
|
|
|
|
assert(package_name != '',
|
|
|
|
'package_name must be specified for subproject builds')
|
|
|
|
else
|
|
|
|
package_name = meson.project_name()
|
|
|
|
endif
|
|
|
|
|
2020-03-08 00:57:34 +00:00
|
|
|
package_version = meson.project_version()
|
2019-12-02 23:07:01 +00:00
|
|
|
prefix = get_option('prefix')
|
|
|
|
|
|
|
|
bindir = join_paths(prefix, get_option('bindir'))
|
|
|
|
datadir = join_paths(prefix, get_option('datadir'))
|
|
|
|
mandir = join_paths(prefix, get_option('mandir'))
|
|
|
|
|
|
|
|
localedir = join_paths(datadir, 'locale')
|
|
|
|
|
|
|
|
gio_dep = dependency('gio-2.0', version: gio_req)
|
|
|
|
gio_unix_dep = dependency('gio-unix-2.0', version: gio_req)
|
|
|
|
autoar_dep = dependency('gnome-autoar-0')
|
|
|
|
json_dep = dependency('json-glib-1.0')
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
2020-03-05 13:56:13 +00:00
|
|
|
bash_completion = dependency('bash-completion', required: get_option('bash_completion'))
|
2019-12-02 23:07:01 +00:00
|
|
|
|
2019-11-08 23:20:08 +00:00
|
|
|
po_dir = meson.source_root() + '/po'
|
|
|
|
|
2019-12-02 23:07:01 +00:00
|
|
|
subdir('src')
|
|
|
|
|
|
|
|
if bash_completion.found()
|
|
|
|
install_data('completion/bash/gnome-extensions',
|
2020-04-09 18:38:02 +00:00
|
|
|
install_dir: bash_completion.get_pkgconfig_variable('completionsdir', define_variable: ['datadir', datadir])
|
2019-12-02 23:07:01 +00:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('man')
|
2020-12-15 18:23:14 +00:00
|
|
|
if fs.exists('man/gnome-extensions.1')
|
|
|
|
install_man('man/gnome-extensions.1')
|
|
|
|
else
|
|
|
|
a2x = find_program('a2x')
|
|
|
|
subdir('man')
|
|
|
|
endif
|
2019-12-02 23:07:01 +00:00
|
|
|
endif
|
2019-12-03 02:02:30 +00:00
|
|
|
|
|
|
|
if not meson.is_subproject()
|
|
|
|
subdir('po')
|
2020-03-05 11:44:35 +00:00
|
|
|
|
|
|
|
summary_dirs = {
|
|
|
|
'prefix': get_option('prefix'),
|
|
|
|
'bindir': get_option('bindir'),
|
|
|
|
'datadir': get_option('datadir'),
|
|
|
|
}
|
|
|
|
|
|
|
|
if get_option('man')
|
|
|
|
summary_dirs += { 'mandir': get_option('mandir') }
|
|
|
|
endif
|
|
|
|
|
|
|
|
summary_build = {
|
|
|
|
'buildtype': get_option('buildtype'),
|
|
|
|
'debug': get_option('debug'),
|
|
|
|
}
|
|
|
|
|
|
|
|
summary_options = {
|
|
|
|
'man': get_option('man'),
|
|
|
|
'bash_completion': bash_completion.found(),
|
|
|
|
}
|
|
|
|
|
2020-03-05 14:35:48 +00:00
|
|
|
summary(summary_dirs, section: 'Directories')
|
|
|
|
summary(summary_build, section: 'Build Configuration')
|
|
|
|
summary(summary_options, section: 'Build Options')
|
2019-12-03 02:02:30 +00:00
|
|
|
endif
|