mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
build: cleanup dependency checking
We always require polkit now, so that we can fallback when we fail to communicate with the peer.
This commit is contained in:
13
meson.build
13
meson.build
@ -47,8 +47,17 @@ if get_option('default_library') != 'static'
|
||||
endif
|
||||
endif
|
||||
|
||||
if get_option('with_sysprofd') != 'none'
|
||||
config_h.set10('ENABLE_POLKIT', true)
|
||||
glib_dep = dependency('glib-2.0', version: glib_req_version)
|
||||
gio_dep = dependency('gio-2.0', version: glib_req_version)
|
||||
gio_unix_dep = dependency('gio-unix-2.0', version: glib_req_version)
|
||||
gtk_dep = dependency('gtk+-3.0', version: gtk_req_version)
|
||||
|
||||
# If we find polkit 0.114, we don't need to backport autoptr cleanups
|
||||
polkit_dep = dependency('polkit-gobject-1', version: '0.114', required: false)
|
||||
if polkit_dep.found()
|
||||
config_h.set10('HAVE_POLKIT_AUTOPTR', true)
|
||||
else
|
||||
polkit_dep = dependency('polkit-gobject-1', version: polkit_req_version)
|
||||
endif
|
||||
|
||||
debugdir = get_option('debugdir')
|
||||
|
||||
@ -30,7 +30,7 @@ configure_file(
|
||||
)
|
||||
|
||||
libsysprof_capture_deps = [
|
||||
dependency('glib-2.0', version: glib_req_version),
|
||||
glib_dep,
|
||||
]
|
||||
|
||||
libsysprof_capture = static_library(
|
||||
|
||||
@ -54,8 +54,8 @@ libsysprof_ui_resources = gnome.compile_resources(
|
||||
)
|
||||
|
||||
libsysprof_ui_deps = [
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gtk+-3.0', version: gtk_req_version),
|
||||
gio_dep,
|
||||
gtk_dep,
|
||||
libsysprof_dep,
|
||||
]
|
||||
|
||||
|
||||
@ -58,8 +58,9 @@ libsysprof_public_sources += libsysprof_capture_sources
|
||||
libsysprof_public_headers += libsysprof_capture_headers
|
||||
|
||||
libsysprof_deps = [
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0', version: glib_req_version),
|
||||
gio_dep,
|
||||
gio_unix_dep,
|
||||
polkit_dep,
|
||||
]
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
@ -89,10 +90,6 @@ if host_machine.system() != 'darwin'
|
||||
libsysprof_deps += [cxx.find_library('stdc++')]
|
||||
endif
|
||||
|
||||
if get_option('with_sysprofd') != 'none'
|
||||
libsysprof_deps += dependency('polkit-gobject-1')
|
||||
endif
|
||||
|
||||
libsysprof = shared_library(
|
||||
'sysprof-@0@'.format(libsysprof_api_version),
|
||||
libsysprof_public_sources + libsysprof_private_sources,
|
||||
|
||||
@ -10,10 +10,10 @@ sysprofd_sources = [
|
||||
pkglibexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
|
||||
|
||||
sysprofd_deps = [
|
||||
dependency('glib-2.0', version: glib_req_version),
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0', version: glib_req_version),
|
||||
dependency('polkit-gobject-1', version: polkit_req_version),
|
||||
glib_dep,
|
||||
gio_dep,
|
||||
gio_unix_dep,
|
||||
polkit_dep,
|
||||
]
|
||||
|
||||
sysprofd = executable('sysprofd', sysprofd_sources,
|
||||
|
||||
Reference in New Issue
Block a user