mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +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:
24
meson.build
24
meson.build
@ -52,30 +52,6 @@ if get_option('default_library') != 'static'
|
||||
endif
|
||||
endif
|
||||
|
||||
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)
|
||||
pangoft2_dep = dependency('pangoft2', required: false)
|
||||
|
||||
if get_option('enable_gtk')
|
||||
gtk_dep = dependency('gtk+-3.0', version: gtk_req_version)
|
||||
dazzle_dep = dependency('libdazzle-1.0', version: dazzle_req_version, fallback: ['libdazzle', 'libdazzle_dep'])
|
||||
endif
|
||||
|
||||
polkit_dep = dependency('polkit-gobject-1', version: '>= 0.114', required: false)
|
||||
if polkit_dep.found()
|
||||
config_h.set10('HAVE_POLKIT_AUTOPTR', true)
|
||||
endif
|
||||
polkit_dep = dependency('polkit-gobject-1', version: polkit_req_version, required: false)
|
||||
|
||||
if polkit_dep.found()
|
||||
config_h.set10('HAVE_POLKIT', true)
|
||||
else
|
||||
if get_option('with_sysprofd') == 'bundled'
|
||||
error('sysprofd requires polkit @0@'.format(polkit_req_version))
|
||||
endif
|
||||
endif
|
||||
|
||||
debugdir = get_option('debugdir')
|
||||
if debugdir == ''
|
||||
debugdir = join_paths(get_option('prefix'), get_option('libdir'), 'debug')
|
||||
|
||||
Reference in New Issue
Block a user