build(meson.build): added option to disable pkg-config file generation
This commit is contained in:
26
meson.build
26
meson.build
@@ -18,7 +18,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# 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 default visibility for all C++ targets
|
||||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||||
@@ -28,14 +28,16 @@ subdir('build-config')
|
|||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
||||||
pkg = import('pkgconfig')
|
if get_option('pkg-config')
|
||||||
pkg.generate(
|
message('Generating pkg-config file for libconfig...')
|
||||||
name: 'libconfig',
|
pkg = import('pkgconfig')
|
||||||
description: 'Configuration module for SERiF and related projects',
|
pkg.generate(
|
||||||
version: meson.project_version(),
|
name: 'libconfig',
|
||||||
libraries: [libconfig],
|
description: 'Configuration module for SERiF and related projects',
|
||||||
subdirs: ['fourdst'],
|
version: meson.project_version(),
|
||||||
filebase: 'fourdst_config',
|
libraries: [libconfig],
|
||||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
|
subdirs: ['fourdst'],
|
||||||
)
|
filebase: 'fourdst_config',
|
||||||
|
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
|
||||||
|
)
|
||||||
|
endif
|
||||||
1
meson_options.txt
Normal file
1
meson_options.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
option('pkg-config', type: 'boolean', value: true, description: 'generate pkg-config file for libconfig (fourdst_config.pc)')
|
||||||
Reference in New Issue
Block a user