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/decoder | |
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/decoder')
-rw-r--r-- | src/decoder/DecoderList.cxx | 1 | ||||
-rw-r--r-- | src/decoder/meson.build | 4 | ||||
-rw-r--r-- | src/decoder/plugins/SidplayDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/decoder/plugins/VorbisDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/decoder/plugins/meson.build | 38 |
5 files changed, 26 insertions, 21 deletions
diff --git a/src/decoder/DecoderList.cxx b/src/decoder/DecoderList.cxx index b860d4c2d..7bca4b0d7 100644 --- a/src/decoder/DecoderList.cxx +++ b/src/decoder/DecoderList.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "DecoderList.hxx" #include "DecoderPlugin.hxx" +#include "decoder/Features.h" #include "PluginUnavailable.hxx" #include "Log.hxx" #include "config/Data.hxx" diff --git a/src/decoder/meson.build b/src/decoder/meson.build index 4b86a2fcf..b8bec5787 100644 --- a/src/decoder/meson.build +++ b/src/decoder/meson.build @@ -1,3 +1,5 @@ +decoder_features = configuration_data() + decoder_api = static_library( 'decoder_api', 'DecoderAPI.cxx', @@ -34,3 +36,5 @@ decoder_glue_dep = declare_dependency( decoder_plugins_dep, ], ) + +configure_file(output: 'Features.h', configuration: decoder_features) diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx index 60de8fef3..61e689ac0 100644 --- a/src/decoder/plugins/SidplayDecoderPlugin.cxx +++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config.h" #include "SidplayDecoderPlugin.hxx" +#include "decoder/Features.h" #include "../DecoderAPI.hxx" #include "tag/Handler.hxx" #include "tag/Builder.hxx" diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx index b71fdd4d8..13361c2ad 100644 --- a/src/decoder/plugins/VorbisDecoderPlugin.cxx +++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx @@ -17,7 +17,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config.h" #include "VorbisDecoderPlugin.h" #include "OggDecoder.hxx" #include "lib/xiph/VorbisComments.hxx" @@ -25,6 +24,7 @@ #include "lib/xiph/OggFind.hxx" #include "VorbisDomain.hxx" #include "../DecoderAPI.hxx" +#include "decoder/Features.h" #include "input/InputStream.hxx" #include "input/Reader.hxx" #include "OggCodec.hxx" diff --git a/src/decoder/plugins/meson.build b/src/decoder/plugins/meson.build index 016d6ee95..6cb5d427d 100644 --- a/src/decoder/plugins/meson.build +++ b/src/decoder/plugins/meson.build @@ -20,12 +20,12 @@ if ffmpeg_dep.found() endif adplug_dep = dependency('adplug', required: get_option('adplug')) -conf.set('ENABLE_ADPLUG', adplug_dep.found()) +decoder_features.set('ENABLE_ADPLUG', adplug_dep.found()) if adplug_dep.found() decoder_plugins_sources += 'AdPlugDecoderPlugin.cxx' endif -conf.set('ENABLE_FLAC', flac_dep.found()) +decoder_features.set('ENABLE_FLAC', flac_dep.found()) if flac_dep.found() decoder_plugins_sources += [ 'FlacDecoderPlugin.cxx', @@ -36,8 +36,8 @@ if flac_dep.found() ] endif -conf.set('ENABLE_VORBIS_DECODER', vorbis_dep.found()) -conf.set('HAVE_TREMOR', libvorbisidec_dep.found()) +decoder_features.set('ENABLE_VORBIS_DECODER', vorbis_dep.found()) +decoder_features.set('HAVE_TREMOR', libvorbisidec_dep.found()) if vorbis_dep.found() decoder_plugins_sources += [ 'VorbisDecoderPlugin.cxx', @@ -45,7 +45,7 @@ if vorbis_dep.found() ] endif -conf.set('ENABLE_OPUS', libopus_dep.found()) +decoder_features.set('ENABLE_OPUS', libopus_dep.found()) if libopus_dep.found() decoder_plugins_sources += [ 'OpusDecoderPlugin.cxx', @@ -64,80 +64,80 @@ if xiph_dep.found() endif fluidsynth_dep = dependency('fluidsynth', version: '>= 1.1', required: get_option('fluidsynth')) -conf.set('ENABLE_FLUIDSYNTH', fluidsynth_dep.found()) +decoder_features.set('ENABLE_FLUIDSYNTH', fluidsynth_dep.found()) if fluidsynth_dep.found() decoder_plugins_sources += 'FluidsynthDecoderPlugin.cxx' endif libaudiofile_dep = dependency('audiofile', version: '>= 0.3', required: get_option('audiofile')) -conf.set('ENABLE_AUDIOFILE', libaudiofile_dep.found()) +decoder_features.set('ENABLE_AUDIOFILE', libaudiofile_dep.found()) if libaudiofile_dep.found() decoder_plugins_sources += 'AudiofileDecoderPlugin.cxx' endif libfaad_dep = c_compiler.find_library('faad', required: get_option('faad')) -conf.set('ENABLE_FAAD', libfaad_dep.found()) +decoder_features.set('ENABLE_FAAD', libfaad_dep.found()) if libfaad_dep.found() decoder_plugins_sources += 'FaadDecoderPlugin.cxx' endif libgme_dep = c_compiler.find_library('gme', required: get_option('gme')) -conf.set('ENABLE_GME', libgme_dep.found()) +decoder_features.set('ENABLE_GME', libgme_dep.found()) if libgme_dep.found() decoder_plugins_sources += 'GmeDecoderPlugin.cxx' endif libmad_dep = c_compiler.find_library('mad', required: get_option('mad')) -conf.set('ENABLE_MAD', libmad_dep.found()) +decoder_features.set('ENABLE_MAD', libmad_dep.found()) if libmad_dep.found() decoder_plugins_sources += 'MadDecoderPlugin.cxx' endif libmikmod_dep = dependency('libmikmod', version: '>= 3.2', required: get_option('mikmod')) -conf.set('ENABLE_LIBMIKMOD', libmikmod_dep.found()) +decoder_features.set('ENABLE_LIBMIKMOD', libmikmod_dep.found()) if libmikmod_dep.found() decoder_plugins_sources += 'MikmodDecoderPlugin.cxx' endif libmodplug_dep = dependency('libmodplug', required: get_option('modplug')) -conf.set('ENABLE_MODPLUG', libmodplug_dep.found()) +decoder_features.set('ENABLE_MODPLUG', libmodplug_dep.found()) if libmodplug_dep.found() decoder_plugins_sources += 'ModplugDecoderPlugin.cxx' endif libmpcdec_dep = c_compiler.find_library('mpcdec', required: get_option('mpcdec')) -conf.set('ENABLE_MPCDEC', libmpcdec_dep.found()) +decoder_features.set('ENABLE_MPCDEC', libmpcdec_dep.found()) if libmpcdec_dep.found() decoder_plugins_sources += 'MpcdecDecoderPlugin.cxx' endif libmpg123_dep = dependency('libmpg123', required: get_option('mpg123')) -conf.set('ENABLE_MPG123', libmpg123_dep.found()) +decoder_features.set('ENABLE_MPG123', libmpg123_dep.found()) if libmpg123_dep.found() decoder_plugins_sources += 'Mpg123DecoderPlugin.cxx' endif libsndfile_dep = dependency('sndfile', required: get_option('sndfile')) -conf.set('ENABLE_SNDFILE', libsndfile_dep.found()) +decoder_features.set('ENABLE_SNDFILE', libsndfile_dep.found()) if libsndfile_dep.found() decoder_plugins_sources += 'SndfileDecoderPlugin.cxx' endif wavpack_dep = dependency('wavpack', required: get_option('wavpack')) -conf.set('ENABLE_WAVPACK', wavpack_dep.found()) +decoder_features.set('ENABLE_WAVPACK', wavpack_dep.found()) if wavpack_dep.found() decoder_plugins_sources += 'WavpackDecoderPlugin.cxx' endif wildmidi_dep = c_compiler.find_library('WildMidi', required: get_option('wildmidi')) -conf.set('ENABLE_WILDMIDI', wildmidi_dep.found()) +decoder_features.set('ENABLE_WILDMIDI', wildmidi_dep.found()) if wildmidi_dep.found() decoder_plugins_sources += 'WildmidiDecoderPlugin.cxx' endif if not get_option('sidplay').disabled() libsidplayfp_dep = dependency('libsidplayfp', version: '>= 1.8', required: false) - conf.set('HAVE_SIDPLAYFP', libsidplayfp_dep.found()) + decoder_features.set('HAVE_SIDPLAYFP', libsidplayfp_dep.found()) if libsidplayfp_dep.found() libsidplay_dep = libsidplayfp_dep @@ -156,7 +156,7 @@ if not get_option('sidplay').disabled() else libsidplay_dep = dependency('', required: false) endif -conf.set('ENABLE_SIDPLAY', libsidplay_dep.found()) +decoder_features.set('ENABLE_SIDPLAY', libsidplay_dep.found()) if libsidplay_dep.found() decoder_plugins_sources += 'SidplayDecoderPlugin.cxx' endif |