From db35a37def14b72181f3630efeea0e0433103c41 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Fri, 27 Jan 2023 21:54:48 +0100 Subject: Install a the configure_file (config.h) and use in headers This addresses: https://github.com/libfuse/libfuse/issues/724 HAVE_LIBC_VERSIONED_SYMBOLS configures the library if to use versioned symbols and is set at meson configuration time. External filesystems (the main target, actually) include fuse headers and the preprocessor then acts on HAVE_LIBC_VERSIONED_SYMBOLS. Problem was now that 'config.h' was not distributed with libfuse and so HAVE_LIBC_VERSIONED_SYMBOLS was never defined with external tools and the preprocessor did the wrong decision. This commit also increases the the minimal meson version, as this depends on meson feature only available in 0.50 WARNING: Project specifies a minimum meson_ version '>= 0.42' but uses features which were added in newer versions: * 0.50.0: {'install arg in configure_file'} Additionally the config file has been renamed to "fuse_config.h" to avoid clashes - 'config.h' is not very specific. --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index d1b2ae0..0057c11 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libfuse3', ['c'], version: '3.13.0', - meson_version: '>= 0.42', + meson_version: '>= 0.50', default_options: [ 'buildtype=debugoptimized', 'cpp_std=c++11', @@ -141,8 +141,8 @@ else endif # Write the test results into config.h (stored in build directory) -configure_file(output: 'config.h', - configuration : cfg) +configure_file(output: 'fuse_config.h', + configuration : cfg, install: true, install_dir: 'include/fuse3') # '.' will refer to current build directory, which contains config.h include_dirs = include_directories('include', 'lib', '.') @@ -169,3 +169,4 @@ endif foreach n : subdirs subdir(n) endforeach + -- cgit v1.2.3