forked from enlightenment/terminology
meson: add 'nls' option. Closes T6398
This commit is contained in:
parent
2b79f06e8d
commit
6513de27bb
26
meson.build
26
meson.build
|
@ -59,26 +59,9 @@ terminology_dependencies = []
|
||||||
edje_cc_path = ''
|
edje_cc_path = ''
|
||||||
edj_targets = []
|
edj_targets = []
|
||||||
edj_files = []
|
edj_files = []
|
||||||
use_translations = false
|
|
||||||
intl_lib = cc.find_library('intl', required: false)
|
if get_option('nls') == true
|
||||||
if intl_lib.found()
|
subdir('po')
|
||||||
config_data.set('HAVE_GETTEXT', 1)
|
|
||||||
config_data.set('ENABLE_NLS', 1)
|
|
||||||
terminology_dependencies += [intl_lib]
|
|
||||||
use_translations = true
|
|
||||||
else
|
|
||||||
gettext_code = '''
|
|
||||||
#include <libintl.h>
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
(void)ngettext("", "", 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
if cc.links(gettext_code)
|
|
||||||
config_data.set('HAVE_GETTEXT', 1)
|
|
||||||
config_data.set('ENABLE_NLS', 1)
|
|
||||||
use_translations = true
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach efl_dep: efl_deps
|
foreach efl_dep: efl_deps
|
||||||
|
@ -137,9 +120,6 @@ configure_file(input: join_paths('pkgbuild', 'PKGBUILD.in'),
|
||||||
config_dir = include_directories('.')
|
config_dir = include_directories('.')
|
||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('man')
|
subdir('man')
|
||||||
if use_translations
|
|
||||||
subdir('po')
|
|
||||||
endif
|
|
||||||
subdir('src/bin')
|
subdir('src/bin')
|
||||||
|
|
||||||
meson.add_install_script('meson_install_themes.sh', edj_files)
|
meson.add_install_script('meson_install_themes.sh', edj_files)
|
||||||
|
|
|
@ -4,4 +4,8 @@ option('edje-cc',
|
||||||
option('fuzzing',
|
option('fuzzing',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: false,
|
value: false,
|
||||||
description: 'Enable fuzzing on terminology. Binaries are not suited for production.')
|
description: 'Enable fuzzing on terminology. Binaries are not suited for production. (default=false)')
|
||||||
|
option('nls',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true,
|
||||||
|
description: 'enable localization: (default=true)')
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
if get_option('nls')
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
i18n.gettext('terminology',
|
i18n.gettext('terminology',
|
||||||
languages: [
|
languages: [
|
||||||
|
@ -27,3 +28,6 @@ i18n.gettext('terminology',
|
||||||
'--from-code=UTF-8',
|
'--from-code=UTF-8',
|
||||||
'--foreign-user'
|
'--foreign-user'
|
||||||
])
|
])
|
||||||
|
config_data.set('HAVE_GETTEXT', '1')
|
||||||
|
config_data.set('ENABLE_NLS', '1')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue