From 0d7972dbc1da24332af2deff00755c0f278f6c29 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Thu, 20 Jun 2024 00:56:26 -0700 Subject: [PATCH] build: Add language files to Meson build --- meson.build | 10 +++++----- po/meson.build | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 po/meson.build diff --git a/meson.build b/meson.build index 440d9e7..9d4dc4a 100644 --- a/meson.build +++ b/meson.build @@ -5,11 +5,9 @@ project('libx52', 'C', # Internationalization i18n = import('i18n') # # define GETTEXT_PACKAGE -# add_project_arguments( -# '-DPACKAGE="libx52"', -# '-DLOCALEDIR=""', -# language:'C') -i18n.gettext(meson.project_name()) +add_project_arguments( + '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), + language:'C') dep_libusb = dependency('libusb-1.0', required: true) dep_hidapi = dependency('hidapi-hidraw', required: false) @@ -336,3 +334,5 @@ if dep_udev.found() install_data(udev_file, install_dir: udev_rules_dir) meson.add_install_script('udev/install-hook.sh') endif + +subdir('po') diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..04384b2 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,4 @@ +i18n.gettext(meson.project_name(), + args: '--directory=' + meson.source_root(), + preset: 'glib' +)