[sysprof] build: allow disabling installation of static libraries



commit 099330db90d55bfa7c348986f43b5a0ecae13b98
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 22 13:43:54 2022 -0700

    build: allow disabling installation of static libraries

 meson_options.txt                  | 3 +++
 src/libsysprof-capture/meson.build | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index 6d94a0bd..5dc5638b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,6 +11,9 @@ option('gtk', type: 'boolean')
 # Disable libsysprof/ui (in situations you only want sysprof-capture)
 option('libsysprof', type: 'boolean')
 
+# Allow disabling the installation of libsysprof-capture*.a
+option('install-static', 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-capture/meson.build b/src/libsysprof-capture/meson.build
index e4e302c3..128b90fe 100644
--- a/src/libsysprof-capture/meson.build
+++ b/src/libsysprof-capture/meson.build
@@ -50,7 +50,7 @@ libsysprof_capture = static_library(
            dependencies: libsysprof_capture_deps,
                  c_args: [ '-DSYSPROF_CAPTURE_COMPILATION' ],
             install_dir: get_option('libdir'),
-                install: not meson.is_subproject(),
+                install: not meson.is_subproject() and get_option('install-static'),
   gnu_symbol_visibility: 'hidden',
                     pic: true,
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]