Skip to content

Commit

Permalink
Fix meson deprecations (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Aug 25, 2024
1 parent e1da776 commit a0d1899
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You'll need the following dependencies:
libgranite-dev
libgtk-3-dev
libwingpanel-dev
meson
meson >= 0.58.0
valac

Run `meson` to configure the build environment and then `ninja` to build
Expand Down
9 changes: 5 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
project(
'nightlight',
'vala', 'c',
version: '2.1.3'
version: '2.1.3',
meson_version: '>= 0.58.0'
)

gettext_name = meson.project_name() + '-indicator'
gnome = import('gnome')
i18n = import('i18n')

prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
libdir = prefix / get_option('libdir')

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(gettext_name), language:'c')
add_project_arguments('-DG_LOG_DOMAIN="io.elementary.wingpanel.nightlight"', language:'c')
Expand All @@ -21,10 +22,10 @@ gresource = gnome.compile_resources(
)

wingpanel_dep = dependency('wingpanel')
wingpanel_indicatorsdir = wingpanel_dep.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir])
wingpanel_indicatorsdir = wingpanel_dep.get_variable('indicatorsdir', pkgconfig_define: ['libdir', libdir])

config_data = configuration_data()
config_data.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
config_data.set_quoted('LOCALEDIR', prefix / get_option('localedir'))
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name() + '-indicator')
config_file = configure_file(
input: 'src/Config.vala.in',
Expand Down
2 changes: 1 addition & 1 deletion po/extra/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
i18n.gettext('extra',
args: '--directory=' + meson.source_root(),
args: '--directory=' + meson.project_source_root(),
preset: 'glib',
install: false,
)
2 changes: 1 addition & 1 deletion po/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
i18n.gettext(gettext_name,
args: '--directory=' + meson.source_root(),
args: '--directory=' + meson.project_source_root(),
preset: 'glib'
)

Expand Down

0 comments on commit a0d1899

Please sign in to comment.