Skip to content

Commit

Permalink
build: Add missing symbols
Browse files Browse the repository at this point in the history
The portals gated behind build options need a pre-processor symbol in
order to be initialised.

The symbols were missing from the Meson build after the port from
Autotools.

Fixes: #453
  • Loading branch information
ebassi committed Oct 21, 2023
1 parent 4b6b713 commit 89650d9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ portal_sources = files(
'dynamic-launcher.c',
)

portal_c_args = [
'-DLOCALEDIR="@0@"'.format(localedir),
]

if get_option('wallpaper').allowed()
portal_deps += dependency('gnome-desktop-3.0')
portal_sources += files(
'wallpaper.c',
'wallpaperpreview.c',
'wallpaperdialog.c',
)
portal_c_args += '-DBUILD_WALLPAPER'
endif

if get_option('settings').allowed()
Expand All @@ -34,6 +39,7 @@ if get_option('settings').allowed()
'fc-monitor.c',
'settings.c',
)
portal_c_args += '-DBUILD_SETTINGS'
endif

if get_option('appchooser').allowed()
Expand All @@ -42,10 +48,12 @@ if get_option('appchooser').allowed()
'appchooserrow.c',
'appchooserdialog.c',
)
portal_c_args += '-DBUILD_APPCHOOSER'
endif

if get_option('lockdown').allowed()
portal_sources += files('lockdown.c')
portal_c_args += '-DBUILD_LOCKDOWN'
endif

if gtkx11_dep.found()
Expand Down Expand Up @@ -95,9 +103,7 @@ executable('xdg-desktop-portal-gtk',
gtkx11_dep,
gtkwayland_dep,
],
c_args: [
'-DLOCALEDIR="@0@"'.format(localedir),
],
c_args: portal_c_args,
include_directories: [root_inc],
install: true,
install_dir: libexecdir,
Expand Down

0 comments on commit 89650d9

Please sign in to comment.