Skip to content

Commit

Permalink
meson: Add define if AppStream version >= 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
meisenzahl committed Nov 16, 2023
1 parent 4ad86e9 commit 91c50ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ libdir = join_paths(prefix, get_option('libdir'))

glib_dep = dependency('glib-2.0', version: '>=2.64.0')

appstream_dep = dependency ('appstream', version: '>=0.12.10')

add_project_arguments(
'-DGETTEXT_PACKAGE="@0@"'.format(gettext_name),
language:'c'
Expand All @@ -28,6 +30,10 @@ if glib_dep.version().version_compare ('>=2.73.0')
vala_flags += ['--define', 'HAS_GLIB_2_73']
endif

if appstream_dep.version().version_compare('>=1.0')
vala_flags += ['--define', 'HAS_APPSTREAM_1_0']
endif

add_project_arguments(vala_flags, language: 'vala')

subdir('data')
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ shared_module(
dependency('gudev-1.0'),
dependency('udisks2'),
dependency('libhandy-1'),
dependency ('appstream', version: '>=0.12.10'),
appstream_dep,
meson.get_compiler('vala').find_library('posix'),
switchboard_dep
],
Expand Down

0 comments on commit 91c50ae

Please sign in to comment.