build: gate capture pkgconfig by install-static

This commit is contained in:
Christian Hergert
2022-07-22 13:45:55 -07:00
parent 099330db90
commit 9e2743fa76

View File

@ -1,3 +1,5 @@
install_static = not meson.is_subproject() and get_option('install-static')
libsysprof_capture_headers = files([
'sysprof-address.h',
'sysprof-clock.h',
@ -50,7 +52,7 @@ libsysprof_capture = static_library(
dependencies: libsysprof_capture_deps,
c_args: [ '-DSYSPROF_CAPTURE_COMPILATION' ],
install_dir: get_option('libdir'),
install: not meson.is_subproject() and get_option('install-static'),
install: install_static,
gnu_symbol_visibility: 'hidden',
pic: true,
)
@ -63,7 +65,7 @@ libsysprof_capture_dep = declare_dependency(
include_directories: libsysprof_capture_include_dirs,
)
if not meson.is_subproject()
if install_static
pkgconfig.generate(
libsysprof_capture,
subdirs: [ sysprof_header_subdir ],