mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +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
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('with_sysprofd') != 'none'
|
glib_dep = dependency('glib-2.0', version: glib_req_version)
|
||||||
config_h.set10('ENABLE_POLKIT', true)
|
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
|
endif
|
||||||
|
|
||||||
debugdir = get_option('debugdir')
|
debugdir = get_option('debugdir')
|
||||||
|
|||||||
@ -30,7 +30,7 @@ configure_file(
|
|||||||
)
|
)
|
||||||
|
|
||||||
libsysprof_capture_deps = [
|
libsysprof_capture_deps = [
|
||||||
dependency('glib-2.0', version: glib_req_version),
|
glib_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
libsysprof_capture = static_library(
|
libsysprof_capture = static_library(
|
||||||
|
|||||||
@ -54,8 +54,8 @@ libsysprof_ui_resources = gnome.compile_resources(
|
|||||||
)
|
)
|
||||||
|
|
||||||
libsysprof_ui_deps = [
|
libsysprof_ui_deps = [
|
||||||
dependency('gio-2.0', version: glib_req_version),
|
gio_dep,
|
||||||
dependency('gtk+-3.0', version: gtk_req_version),
|
gtk_dep,
|
||||||
libsysprof_dep,
|
libsysprof_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -58,8 +58,9 @@ libsysprof_public_sources += libsysprof_capture_sources
|
|||||||
libsysprof_public_headers += libsysprof_capture_headers
|
libsysprof_public_headers += libsysprof_capture_headers
|
||||||
|
|
||||||
libsysprof_deps = [
|
libsysprof_deps = [
|
||||||
dependency('gio-2.0', version: glib_req_version),
|
gio_dep,
|
||||||
dependency('gio-unix-2.0', version: glib_req_version),
|
gio_unix_dep,
|
||||||
|
polkit_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
@ -89,10 +90,6 @@ if host_machine.system() != 'darwin'
|
|||||||
libsysprof_deps += [cxx.find_library('stdc++')]
|
libsysprof_deps += [cxx.find_library('stdc++')]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('with_sysprofd') != 'none'
|
|
||||||
libsysprof_deps += dependency('polkit-gobject-1')
|
|
||||||
endif
|
|
||||||
|
|
||||||
libsysprof = shared_library(
|
libsysprof = shared_library(
|
||||||
'sysprof-@0@'.format(libsysprof_api_version),
|
'sysprof-@0@'.format(libsysprof_api_version),
|
||||||
libsysprof_public_sources + libsysprof_private_sources,
|
libsysprof_public_sources + libsysprof_private_sources,
|
||||||
|
|||||||
@ -10,10 +10,10 @@ sysprofd_sources = [
|
|||||||
pkglibexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
|
pkglibexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
|
||||||
|
|
||||||
sysprofd_deps = [
|
sysprofd_deps = [
|
||||||
dependency('glib-2.0', version: glib_req_version),
|
glib_dep,
|
||||||
dependency('gio-2.0', version: glib_req_version),
|
gio_dep,
|
||||||
dependency('gio-unix-2.0', version: glib_req_version),
|
gio_unix_dep,
|
||||||
dependency('polkit-gobject-1', version: polkit_req_version),
|
polkit_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
sysprofd = executable('sysprofd', sysprofd_sources,
|
sysprofd = executable('sysprofd', sysprofd_sources,
|
||||||
|
|||||||
Reference in New Issue
Block a user