build: Fix Sysprof interface path with split sysprof package
When sysprof-4 and libsysprof-capture-4 are installed into different prefixes, such as with Nix package manager, the D-Bus interfaces are likely not discoverable from the latter package. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2572>
This commit is contained in:
parent
6d7a5a91bf
commit
81cc05e61e
3 changed files with 9 additions and 8 deletions
|
@ -31,7 +31,7 @@ cogl_pkg_private_deps = [
|
|||
|
||||
if have_profiler
|
||||
cogl_pkg_private_deps += [
|
||||
sysprof_dep,
|
||||
libsysprof_capture_dep,
|
||||
]
|
||||
endif
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ endif
|
|||
have_profiler = get_option('profiler')
|
||||
if have_profiler
|
||||
# libsysprof-capture support
|
||||
sysprof_dep = dependency('sysprof-capture-4',
|
||||
libsysprof_capture_dep = dependency('sysprof-capture-4',
|
||||
required: true,
|
||||
default_options: [
|
||||
'examples=false',
|
||||
|
@ -424,6 +424,13 @@ if have_profiler
|
|||
],
|
||||
fallback: ['sysprof', 'libsysprof_capture_dep'],
|
||||
)
|
||||
|
||||
if libsysprof_capture_dep.type_name() == 'pkgconfig'
|
||||
sysprof_dep = dependency('sysprof-4')
|
||||
sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_variable('datadir'), 'dbus-1', 'interfaces')
|
||||
else
|
||||
sysprof_dbus_interfaces_dir = join_paths(mutter_srcdir, 'subprojects', 'sysprof', 'src')
|
||||
endif
|
||||
endif
|
||||
|
||||
required_functions = [
|
||||
|
|
|
@ -885,12 +885,6 @@ if have_profiler
|
|||
'core/meta-profiler.h',
|
||||
]
|
||||
|
||||
if sysprof_dep.type_name() == 'pkgconfig'
|
||||
sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_variable('datadir'), 'dbus-1', 'interfaces')
|
||||
else
|
||||
sysprof_dbus_interfaces_dir = join_paths(mutter_srcdir, 'subprojects', 'sysprof', 'src')
|
||||
endif
|
||||
|
||||
sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
|
||||
dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',
|
||||
sysprof3_dbus_file,
|
||||
|
|
Loading…
Reference in a new issue