[sysprof] build: fix -Dagent=true -Dlibsysprof=false
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] build: fix -Dagent=true -Dlibsysprof=false
- Date: Fri, 22 Jul 2022 18:54:49 +0000 (UTC)
commit 0dc0a5b3ded087b2bf1afd88989618ec0f8d2cc9
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 22 11:54:34 2022 -0700
build: fix -Dagent=true -Dlibsysprof=false
The agent is statically linked so that it doesn't require using a properly
working libsysprof to be installed. This ensures that it continues to build
properly in that case so it can be used from org.gnome.Sdk.
meson.build | 10 +++++++++-
src/meson.build | 19 ++++++++-----------
2 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index 554662f9..b397750d 100644
--- a/meson.build
+++ b/meson.build
@@ -28,7 +28,7 @@ polkit_req_version = '>= 0.105'
cc = meson.get_compiler('c')
-if get_option('libsysprof')
+if get_option('libsysprof') or get_option('agent')
add_languages('cpp', native: false)
cxx = meson.get_compiler('cpp')
endif
@@ -197,6 +197,14 @@ int main(void) {
config_h.set10('HAVE_STDATOMIC_H', true)
endif
+if get_option('libsysprof') or get_option('agent')
+ needs_service_access = true
+endif
+
+if needs_service_access or get_option('sysprofd') == 'bundled'
+ install_service_files = true
+endif
+
subdir('src')
subdir('data')
subdir('po')
diff --git a/src/meson.build b/src/meson.build
index 1a9ebd84..03d6a7ec 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -8,7 +8,7 @@ sysprof_version_conf.set('MINOR_VERSION', sysprof_version[1])
sysprof_version_conf.set('MICRO_VERSION', sysprof_version[2])
sysprof_version_conf.set('VERSION', meson.project_version())
-if get_option('sysprofd') == 'bundled' or get_option('libsysprof')
+if needs_service_access
ipc_profiler_src = gnome.gdbus_codegen('ipc-profiler',
sources: 'org.gnome.Sysprof3.Profiler.xml',
interface_prefix: 'org.gnome.Sysprof3.',
@@ -32,18 +32,15 @@ if get_option('sysprofd') == 'bundled' or get_option('libsysprof')
interface_prefix: 'org.gnome.Sysprof.',
namespace: 'Ipc',
)
-
- install_data(['org.gnome.Sysprof3.Service.xml',
- 'org.gnome.Sysprof2.xml',
- 'org.gnome.Sysprof.Agent.xml'],
- install_dir: join_paths(datadir, 'dbus-1/interfaces'),
- )
endif
-org_gnome_Sysprof3_Profiler_xml = files(['org.gnome.Sysprof3.Profiler.xml'])
-
-if get_option('libsysprof')
- install_data(org_gnome_Sysprof3_Profiler_xml,
+if install_service_files
+ install_data([
+ 'org.gnome.Sysprof2.xml',
+ 'org.gnome.Sysprof3.Profiler.xml',
+ 'org.gnome.Sysprof3.Service.xml',
+ 'org.gnome.Sysprof.Agent.xml'
+ ],
install_dir: join_paths(datadir, 'dbus-1/interfaces'),
)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]