diff --git a/meson.build b/meson.build index 37ddb9e..351469d 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # *********************************************************************** # -project('libconstants', 'cpp', version: 'v1.0.6', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') +project('libconstants', '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') @@ -30,14 +30,17 @@ subdir('assets/static') subdir('src') subdir('tests') -pkg = import('pkgconfig') -pkg.generate( - name: 'libconstants', - description: 'Physical Constants for SERiF and related projects', - version: meson.project_version(), - libraries: [libconst], - subdirs: ['fourdst'], - filebase: 'fourdst_constants', - install_dir: join_paths(get_option('libdir'), 'pkgconfig') -) +if get_option('pkg-config') + message('Generating pkg-config file for libconstants...') + pkg = import('pkgconfig') + pkg.generate( + name: 'libconstants', + description: 'Physical Constants for SERiF and related projects', + version: meson.project_version(), + libraries: [libconst], + subdirs: ['fourdst'], + filebase: 'fourdst_constants', + install_dir: join_paths(get_option('libdir'), 'pkgconfig') + ) +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..f1da5ba --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('pkg-config', type: 'boolean', value: true, description: 'generate pkg-config file for libconstants (fourdst_constants.pc)')