From 425b36ec07ea236c266ba63a93b670b472a1b130 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Fri, 4 Apr 2025 00:30:25 +0200 Subject: fix: building atrild with explicit sources Signed-off-by: Oz Tiram --- meson.build | 1 - shell/meson.build | 16 +++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 6ae98a60..1ae9885c 100644 --- a/meson.build +++ b/meson.build @@ -268,7 +268,6 @@ shell_core_deps = [ gio, ] -# Process subdirectories in the correct order subdir('libdocument') subdir('libview') subdir('libmisc') diff --git a/shell/meson.build b/shell/meson.build index babff1aa..f3134949 100644 --- a/shell/meson.build +++ b/shell/meson.build @@ -106,7 +106,6 @@ atril_deps = [ libevproperties_dep ] -# Conditional compilation for DBus if get_option('enable_dbus') dbus_generated = gnome.gdbus_codegen( 'ev-gdbus-generated', @@ -116,6 +115,9 @@ if get_option('enable_dbus') object_manager: true, ) + shell_sources += dbus_generated + + # Generate the daemon D-Bus code dbus_daemon_generated = gnome.gdbus_codegen( 'ev-daemon-gdbus-generated', 'ev-daemon-gdbus.xml', @@ -124,17 +126,13 @@ if get_option('enable_dbus') object_manager: true, ) - shell_sources += dbus_generated - - atrild_sources = [ - 'ev-daemon.c', - ] - - atrild_sources += dbus_daemon_generated + # Create the daemon executable + # Use a custom_target to ensure the generated files are properly compiled + daemon_sources = ['ev-daemon.c', 'ev-daemon-gdbus-generated.c', 'ev-daemon-gdbus-generated.h'] executable( 'atrild', - atrild_sources, + sources: daemon_sources, include_directories: include_dirs, dependencies: atril_deps, c_args: c_args, -- cgit v1.2.1