diff --git a/.gitignore b/.gitignore index 6705203f7..cf5b826c2 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ doc/reference/meta.types .dirstamp **/tags.* build/ +subprojects/sysprof/ diff --git a/meson.build b/meson.build index e87071d7f..25f0b50fb 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('mutter', 'c', version: '3.37.3', - meson_version: '>= 0.50.0', + meson_version: '>= 0.51.0', license: 'GPLv2+' ) @@ -53,7 +53,7 @@ gbm_req = '>= 10.3' libpipewire_req = '>= 0.3.0' # profiler requirements -sysprof_req = '>= 3.35.2' +sysprof_req = '>= 3.37.2' gnome = import('gnome') pkg = import('pkgconfig') @@ -279,7 +279,20 @@ endif have_profiler = get_option('profiler') if have_profiler - sysprof_dep = dependency('sysprof-capture-3', version: sysprof_req) + # libsysprof-capture support + sysprof_dep = dependency('sysprof-capture-4', + required: true, + default_options: [ + 'enable_examples=false', + 'enable_gtk=false', + 'enable_tests=false', + 'enable_tools=false', + 'libsysprof=false', + 'with_sysprofd=none', + 'help=false', + ], + fallback: ['sysprof', 'libsysprof_capture_dep'], + ) endif required_functions = [ diff --git a/src/meson.build b/src/meson.build index ae286526e..54b3af8fa 100644 --- a/src/meson.build +++ b/src/meson.build @@ -748,9 +748,13 @@ if have_profiler 'backends/meta-profiler.h', ] - sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') - sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') + if sysprof_dep.type_name() == 'pkgconfig' + sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') + else + sysprof_dbus_interfaces_dir = join_paths(meson.source_root(), '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, interface_prefix: 'org.gnome.', diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap new file mode 100644 index 000000000..c8f5883fb --- /dev/null +++ b/subprojects/sysprof.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=sysprof +url=https://gitlab.gnome.org/GNOME/sysprof.git +revision=cae28263ff5dd4a510d82f3dc2e3a3b3d9b386fb