diff options
author | Max Kellermann <max@musicpd.org> | 2020-05-05 14:45:18 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-05-05 15:06:50 +0200 |
commit | 8f178401e4ab24ab52ca2ae73cda574c3b45dbe1 (patch) | |
tree | c8a15fa666bf5e0217bed5a547d50ed7ae7029bd /src/archive | |
parent | 8c1d78873d105280e3d7d9bff52052064ba526f2 (diff) |
*/plugins/meson.build: define feature macros in Features.h
This makes ccache more efficient when recompiling with different
plugins.
Diffstat (limited to 'src/archive')
-rw-r--r-- | src/archive/ArchiveList.cxx | 2 | ||||
-rw-r--r-- | src/archive/meson.build | 4 | ||||
-rw-r--r-- | src/archive/plugins/meson.build | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/archive/ArchiveList.cxx b/src/archive/ArchiveList.cxx index a81d4f382..5c1344a0a 100644 --- a/src/archive/ArchiveList.cxx +++ b/src/archive/ArchiveList.cxx @@ -17,9 +17,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config.h" #include "ArchiveList.hxx" #include "ArchivePlugin.hxx" +#include "archive/Features.h" #include "util/StringUtil.hxx" #include "plugins/Bzip2ArchivePlugin.hxx" #include "plugins/Iso9660ArchivePlugin.hxx" diff --git a/src/archive/meson.build b/src/archive/meson.build index c40b7b272..2214558aa 100644 --- a/src/archive/meson.build +++ b/src/archive/meson.build @@ -1,3 +1,5 @@ +archive_features = configuration_data() + archive_api = static_library( 'archive_api', 'ArchiveList.cxx', @@ -10,6 +12,8 @@ archive_api_dep = declare_dependency( subdir('plugins') +configure_file(output: 'Features.h', configuration: archive_features) + conf.set('ENABLE_ARCHIVE', found_archive_plugin) if not found_archive_plugin archive_glue_dep = dependency('', required: false) diff --git a/src/archive/plugins/meson.build b/src/archive/plugins/meson.build index 5eac5fd87..f4ef98b65 100644 --- a/src/archive/plugins/meson.build +++ b/src/archive/plugins/meson.build @@ -2,21 +2,21 @@ archive_plugins_sources = [] found_archive_plugin = false libiso9660_dep = dependency('libiso9660', required: get_option('iso9660')) -conf.set('ENABLE_ISO9660', libiso9660_dep.found()) +archive_features.set('ENABLE_ISO9660', libiso9660_dep.found()) if libiso9660_dep.found() archive_plugins_sources += 'Iso9660ArchivePlugin.cxx' found_archive_plugin = true endif libbz2_dep = c_compiler.find_library('bz2', required: get_option('bzip2')) -conf.set('ENABLE_BZ2', libbz2_dep.found()) +archive_features.set('ENABLE_BZ2', libbz2_dep.found()) if libbz2_dep.found() archive_plugins_sources += 'Bzip2ArchivePlugin.cxx' found_archive_plugin = true endif libzzip_dep = dependency('zziplib', version: '>= 0.13', required: get_option('zzip')) -conf.set('ENABLE_ZZIP', libzzip_dep.found()) +archive_features.set('ENABLE_ZZIP', libzzip_dep.found()) if libzzip_dep.found() archive_plugins_sources += 'ZzipArchivePlugin.cxx' found_archive_plugin = true |