Skip to content

Commit

Permalink
meson: Make flatpak dependency required only on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowd authored and GeorgesStavracas committed Oct 25, 2022
1 parent 3f97964 commit a6ba779
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion data/meson.build
@@ -1,5 +1,8 @@
# This file is built into the GDbus sources but does not get installed by us
flatpak_intf_sources = files(flatpak_intf_dir / 'org.freedesktop.portal.Flatpak.xml')
flatpak_intf_sources = []
if flatpak_intf_dir != ''
flatpak_intf_sources = files(flatpak_intf_dir / 'org.freedesktop.portal.Flatpak.xml')
endif

portal_sources = files(
'org.freedesktop.portal.Account.xml',
Expand Down
7 changes: 5 additions & 2 deletions meson.build
Expand Up @@ -20,8 +20,11 @@ endif

flatpak_intf_dir = get_option('flatpak-interfaces-dir')
if flatpak_intf_dir == ''
flatpak_dep = dependency('flatpak', version: '>= 1.5.0')
flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
flatpak_required = host_machine.system() in ['linux']
flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : flatpak_required)
if flatpak_dep.found()
flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
endif
endif

systemd_userunit_dir = get_option('systemd-user-unit-dir')
Expand Down

0 comments on commit a6ba779

Please sign in to comment.