diff --git a/meson.build b/meson.build index d1766f8..b6f17b3 100644 --- a/meson.build +++ b/meson.build @@ -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 \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..ad7b203 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('pkg-config', type: 'boolean', value: true, description: 'generate pkg-config file for libconfig (fourdst_config.pc)')