mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-12 09:41:18 +02:00
build: add translation support to build system
This commit is contained in:
parent
a12908e7e8
commit
9d61c0bc20
4 changed files with 14 additions and 0 deletions
|
@ -5,6 +5,9 @@ inih_cpp = dependency('INIReader', fallback: ['inih', 'INIReader_dep'])
|
|||
libpam = meson.get_compiler('cpp').find_library('pam')
|
||||
threads = dependency('threads')
|
||||
|
||||
# Translations
|
||||
subdir('po')
|
||||
|
||||
shared_library(
|
||||
'pam_howdy',
|
||||
'main.cc',
|
||||
|
|
0
src/pam/po/LINGUAS
Normal file
0
src/pam/po/LINGUAS
Normal file
1
src/pam/po/POTFILES
Normal file
1
src/pam/po/POTFILES
Normal file
|
@ -0,0 +1 @@
|
|||
main.cc
|
10
src/pam/po/meson.build
Normal file
10
src/pam/po/meson.build
Normal file
|
@ -0,0 +1,10 @@
|
|||
i18n = import('i18n')
|
||||
|
||||
# define GETTEXT_PACKAGE and LOCALEDIR
|
||||
gettext_package = '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name())
|
||||
localedir = '-DLOCALEDIR="@0@"'.format(get_option('prefix') / get_option('localedir'))
|
||||
add_project_arguments(gettext_package, localedir, language: 'cpp')
|
||||
|
||||
i18n.gettext(meson.project_name(),
|
||||
args: [ '--directory=' + meson.source_root(), '--keyword=S:1' ]
|
||||
)
|
Loading…
Reference in a new issue