build: Use fixed gettext domain for non-subproject extension-tool builds

Clarify how the option is supposed to be used by
 - ignoring it for non-subproject builds
 - enforcing that it is set for subproject builds

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072
This commit is contained in:
Florian Müllner 2020-03-05 14:28:21 +01:00
parent 8f851e8adf
commit 8a89e22e8e
2 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,14 @@ gio_req = '>= 2.56.0'
gnome = import('gnome')
i18n = import('i18n')
package_name = get_option('package_name')
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
package_version = meson.project_version()
prefix = get_option('prefix')

View File

@ -7,6 +7,5 @@ option('man',
option('package_name',
type: 'string',
value: 'gnome-extensions-tool',
description: 'The gettext domain name'
description: 'The gettext domain name when used as a subproject'
)