build(meson.build): added option to disable pkg-config file generation

This commit is contained in:
2025-07-22 13:28:57 -04:00
parent 22980b5240
commit 362055bf05
2 changed files with 15 additions and 12 deletions

View File

@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# *********************************************************************** #
project('libconfig', 'cpp', version: 'v1.0.8', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
project('libconfig', 'cpp', version: 'v1.1.0', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
# Add default visibility for all C++ targets
add_project_arguments('-fvisibility=default', language: 'cpp')
@@ -28,14 +28,16 @@ subdir('build-config')
subdir('src')
subdir('tests')
pkg = import('pkgconfig')
pkg.generate(
name: 'libconfig',
description: 'Configuration module for SERiF and related projects',
version: meson.project_version(),
libraries: [libconfig],
subdirs: ['fourdst'],
filebase: 'fourdst_config',
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
)
if get_option('pkg-config')
message('Generating pkg-config file for libconfig...')
pkg = import('pkgconfig')
pkg.generate(
name: 'libconfig',
description: 'Configuration module for SERiF and related projects',
version: meson.project_version(),
libraries: [libconfig],
subdirs: ['fourdst'],
filebase: 'fourdst_config',
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
)
endif

1
meson_options.txt Normal file
View File

@@ -0,0 +1 @@
option('pkg-config', type: 'boolean', value: true, description: 'generate pkg-config file for libconfig (fourdst_config.pc)')