[sysprof] build: add -Dlibsysprof option
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] build: add -Dlibsysprof option
- Date: Mon, 3 Jun 2019 19:26:32 +0000 (UTC)
commit 5630e1680fd7094d5801fce3061ec4a04aa6f7ea
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 3 12:26:25 2019 -0700
build: add -Dlibsysprof option
This gets us closer to being able to only build the capture static library
meson_options.txt | 3 +++
src/libsysprof-ui/meson.build | 2 +-
src/libsysprof/meson.build | 4 ++++
src/sysprof/meson.build | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index fd0c9d1..f30c783 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,6 +3,9 @@
# server scenarios.
option('enable_gtk', type: 'boolean')
+# Disable libsysprof/ui (in situations you only want sysprof-capture)
+option('libsysprof', type: 'boolean')
+
# Optionally compile sysprofd, which is needed to get elevated privileges.
# You only really want to ignore this if you are running from a container
# and are talking to a host daemon. Also, if you're compiling for something
diff --git a/src/libsysprof-ui/meson.build b/src/libsysprof-ui/meson.build
index f25f5f2..fc9c947 100644
--- a/src/libsysprof-ui/meson.build
+++ b/src/libsysprof-ui/meson.build
@@ -1,4 +1,4 @@
-if get_option('enable_gtk')
+if get_option('enable_gtk') and get_option('libsysprof')
libsysprof_ui_public_sources = [
'sysprof-aid.c',
diff --git a/src/libsysprof/meson.build b/src/libsysprof/meson.build
index 3b9679c..1d89e7d 100644
--- a/src/libsysprof/meson.build
+++ b/src/libsysprof/meson.build
@@ -1,3 +1,5 @@
+if get_option('libsysprof')
+
libsysprof_c_args = [ '-DSYSPROF_COMPILATION' ]
libsysprof_public_sources = [
@@ -127,3 +129,5 @@ pkgconfig.generate(
)
install_headers(libsysprof_public_headers, subdir: sysprof_header_subdir)
+
+endif
diff --git a/src/sysprof/meson.build b/src/sysprof/meson.build
index 1595ed4..6a29160 100644
--- a/src/sysprof/meson.build
+++ b/src/sysprof/meson.build
@@ -1,4 +1,4 @@
-if get_option('enable_gtk')
+if get_option('enable_gtk') and get_option('libsysprof')
sysprof_sources = [
'sysprof.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]