Skip to content

Commit

Permalink
meson: Track dependencies of xdp utils in xdp_utils_deps
Browse files Browse the repository at this point in the history
This way we don't have to understand that libsystemd_dep is required
when xdp_utils_sources are used.
  • Loading branch information
swick committed Oct 18, 2024
1 parent ff460df commit 85e89bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ xdp_method_info_built_sources = configure_file(

xdp_method_info_sources = files('xdp-method-info.c') + xdp_method_info_built_sources

xdp_utils_deps = []
xdp_utils_includes = include_directories('.')
xdp_utils_sources = files(
'xdp-utils.c',
Expand All @@ -62,6 +63,7 @@ xdp_utils_sources = files(

if have_libsystemd
xdp_utils_sources += sd_escape_sources
xdp_utils_deps += [libsystemd_dep]
endif

xdg_desktop_portal_sources = files(
Expand Down Expand Up @@ -132,7 +134,7 @@ common_deps = [
xdg_desktop_portal_deps = common_deps + [
geoclue_dep,
pipewire_dep,
libsystemd_dep,
xdp_utils_deps,
]

incs_xdg_desktop_portal = [
Expand Down
8 changes: 4 additions & 4 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ test_portals = executable(
portal_built_sources,
test_portals_sources,
xdp_utils_sources,
dependencies: [common_deps, libportal_dep, libsystemd_dep],
dependencies: [common_deps, libportal_dep, xdp_utils_deps],
include_directories: [common_includes, xdp_utils_includes],
c_args: [
'-DXDG_DP_BUILDDIR="src"',
Expand All @@ -147,7 +147,7 @@ limited_portals = executable(
portal_built_sources,
limited_portals_sources,
xdp_utils_sources,
dependencies: [common_deps, libportal_dep, libsystemd_dep],
dependencies: [common_deps, libportal_dep, xdp_utils_deps],
include_directories: [common_includes, xdp_utils_includes],
c_args: [
'-DXDG_DP_BUILDDIR="src"',
Expand Down Expand Up @@ -230,7 +230,7 @@ test_permission_store = executable(
'utils.c',
permission_store_built_sources,
xdp_utils_sources,
dependencies: [common_deps, libsystemd_dep],
dependencies: [common_deps, xdp_utils_deps],
include_directories: [common_includes, xdp_utils_includes],
install: enable_installed_tests,
install_dir: installed_tests_dir,
Expand All @@ -248,7 +248,7 @@ test_xdp_utils = executable(
'test-xdp-utils.c',
'utils.c',
xdp_utils_sources,
dependencies: [common_deps, libsystemd_dep],
dependencies: [common_deps, xdp_utils_deps],
include_directories: [common_includes, xdp_utils_includes],
install: enable_installed_tests,
install_dir: installed_tests_dir,
Expand Down

0 comments on commit 85e89bd

Please sign in to comment.