build(meson.build): added option to disable pkg-config file generation
This commit is contained in:
@@ -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,6 +28,8 @@ subdir('build-config')
|
|||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
||||||
|
if get_option('pkg-config')
|
||||||
|
message('Generating pkg-config file for libconfig...')
|
||||||
pkg = import('pkgconfig')
|
pkg = import('pkgconfig')
|
||||||
pkg.generate(
|
pkg.generate(
|
||||||
name: 'libconfig',
|
name: 'libconfig',
|
||||||
@@ -38,4 +40,4 @@ pkg.generate(
|
|||||||
filebase: 'fourdst_config',
|
filebase: 'fourdst_config',
|
||||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
|
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