mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
build: Move Meson dependency() calls to where they’re used
This avoids making the project depend on all its dependencies, some of which are optional, when being built as a Meson subproject. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@ -100,10 +100,19 @@ librax_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
polkit_dep = dependency('polkit-gobject-1', version: polkit_req_version, required: false)
|
||||
if polkit_dep.found()
|
||||
libsysprof_c_args += ['-DHAVE_POLKIT']
|
||||
endif
|
||||
|
||||
if dependency('polkit-gobject-1', version: '>= 0.114', required: false).found()
|
||||
libsysprof_c_args += ['-DHAVE_POLKIT_AUTOPTR']
|
||||
endif
|
||||
|
||||
libsysprof_deps = [
|
||||
libsysprof_capture_deps,
|
||||
gio_dep,
|
||||
gio_unix_dep,
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0', version: glib_req_version),
|
||||
polkit_dep,
|
||||
librax_dep,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user