build with Meson instead of autotools
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "CommandLine.hxx"
|
||||
#include "GitVersion.hxx"
|
||||
#include "ls.hxx"
|
||||
#include "LogInit.hxx"
|
||||
#include "Log.hxx"
|
||||
@@ -107,11 +108,7 @@ static constexpr Domain cmdline_domain("cmdline");
|
||||
gcc_noreturn
|
||||
static void version(void)
|
||||
{
|
||||
printf("Music Player Daemon " VERSION
|
||||
#ifdef GIT_COMMIT
|
||||
" (" GIT_COMMIT ")"
|
||||
#endif
|
||||
"\n"
|
||||
printf("Music Player Daemon " VERSION " (%s)\n"
|
||||
"\n"
|
||||
"Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>\n"
|
||||
"Copyright 2008-2017 Max Kellermann <max.kellermann@gmail.com>\n"
|
||||
@@ -120,7 +117,8 @@ static void version(void)
|
||||
|
||||
#ifdef ENABLE_DATABASE
|
||||
"\n"
|
||||
"Database plugins:\n");
|
||||
"Database plugins:\n",
|
||||
GIT_VERSION);
|
||||
|
||||
for (auto i = database_plugins; *i != nullptr; ++i)
|
||||
printf(" %s", (*i)->name);
|
||||
|
22
src/GitVersion.cxx
Normal file
22
src/GitVersion.cxx
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2003-2017 The Music Player Daemon Project
|
||||
* http://www.musicpd.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "GitVersion.hxx"
|
||||
|
||||
char GIT_VERSION[] = "@VCS_TAG@";
|
25
src/GitVersion.hxx
Normal file
25
src/GitVersion.hxx
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2003-2017 The Music Player Daemon Project
|
||||
* http://www.musicpd.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef MPD_GIT_VERSION_HXX
|
||||
#define MPD_GIT_VERSION_HXX
|
||||
|
||||
extern char GIT_VERSION[];
|
||||
|
||||
#endif
|
33
src/archive/meson.build
Normal file
33
src/archive/meson.build
Normal file
@@ -0,0 +1,33 @@
|
||||
archive_api = static_library(
|
||||
'archive_api',
|
||||
'ArchiveDomain.cxx',
|
||||
'ArchiveLookup.cxx',
|
||||
'ArchiveList.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
archive_api_dep = declare_dependency(
|
||||
link_with: archive_api,
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
conf.set('ENABLE_ARCHIVE', found_archive_plugin)
|
||||
if not found_archive_plugin
|
||||
archive_glue_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
archive_glue = static_library(
|
||||
'archive_glue',
|
||||
'ArchivePlugin.cxx',
|
||||
'../input/plugins/ArchiveInputPlugin.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
archive_glue_dep = declare_dependency(
|
||||
link_with: archive_glue,
|
||||
dependencies: [
|
||||
archive_plugins_dep,
|
||||
],
|
||||
)
|
42
src/archive/plugins/meson.build
Normal file
42
src/archive/plugins/meson.build
Normal file
@@ -0,0 +1,42 @@
|
||||
archive_plugins_sources = []
|
||||
found_archive_plugin = false
|
||||
|
||||
libiso9660_dep = dependency('libiso9660', required: get_option('iso9660'))
|
||||
conf.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())
|
||||
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())
|
||||
if libzzip_dep.found()
|
||||
archive_plugins_sources += 'ZzipArchivePlugin.cxx'
|
||||
found_archive_plugin = true
|
||||
endif
|
||||
|
||||
archive_plugins = static_library(
|
||||
'archive_plugins',
|
||||
archive_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libbz2_dep,
|
||||
libiso9660_dep,
|
||||
libzzip_dep,
|
||||
],
|
||||
)
|
||||
|
||||
archive_plugins_dep = declare_dependency(
|
||||
link_with: archive_plugins,
|
||||
dependencies: [
|
||||
archive_api_dep,
|
||||
input_glue_dep,
|
||||
],
|
||||
)
|
22
src/config/meson.build
Normal file
22
src/config/meson.build
Normal file
@@ -0,0 +1,22 @@
|
||||
config = static_library(
|
||||
'fs',
|
||||
'Path.cxx',
|
||||
'Check.cxx',
|
||||
'Data.cxx',
|
||||
'Block.cxx',
|
||||
'Param.cxx',
|
||||
'Parser.cxx',
|
||||
'File.cxx',
|
||||
'Migrate.cxx',
|
||||
'Templates.cxx',
|
||||
'Domain.cxx',
|
||||
'Net.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
config_dep = declare_dependency(
|
||||
link_with: config,
|
||||
dependencies: [
|
||||
fs_dep,
|
||||
],
|
||||
)
|
55
src/db/meson.build
Normal file
55
src/db/meson.build
Normal file
@@ -0,0 +1,55 @@
|
||||
db_api = static_library(
|
||||
'db_api',
|
||||
'DatabaseLock.cxx',
|
||||
'Selection.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
db_api_dep = declare_dependency(
|
||||
link_with: db_api,
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
db_glue_sources = [
|
||||
'Count.cxx',
|
||||
'update/UpdateDomain.cxx',
|
||||
'update/Config.cxx',
|
||||
'update/Service.cxx',
|
||||
'update/Queue.cxx',
|
||||
'update/UpdateIO.cxx',
|
||||
'update/Editor.cxx',
|
||||
'update/Walk.cxx',
|
||||
'update/UpdateSong.cxx',
|
||||
'update/Container.cxx',
|
||||
'update/Remove.cxx',
|
||||
'update/ExcludeList.cxx',
|
||||
'DatabaseGlue.cxx',
|
||||
'Configured.cxx',
|
||||
'DatabaseSong.cxx',
|
||||
'DatabasePrint.cxx',
|
||||
'DatabaseQueue.cxx',
|
||||
'DatabasePlaylist.cxx',
|
||||
]
|
||||
|
||||
if enable_inotify
|
||||
db_glue_sources += [
|
||||
'update/InotifyDomain.cxx',
|
||||
'update/InotifySource.cxx',
|
||||
'update/InotifyQueue.cxx',
|
||||
'update/InotifyUpdate.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
db_glue = static_library(
|
||||
'db_glue',
|
||||
db_glue_sources,
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
db_glue_dep = declare_dependency(
|
||||
link_with: db_glue,
|
||||
dependencies: [
|
||||
db_plugins_dep,
|
||||
],
|
||||
)
|
49
src/db/plugins/meson.build
Normal file
49
src/db/plugins/meson.build
Normal file
@@ -0,0 +1,49 @@
|
||||
db_plugins_sources = [
|
||||
'../../PlaylistDatabase.cxx',
|
||||
'../Registry.cxx',
|
||||
'../Helpers.cxx',
|
||||
'../VHelper.cxx',
|
||||
'../UniqueTags.cxx',
|
||||
'simple/DatabaseSave.cxx',
|
||||
'simple/DirectorySave.cxx',
|
||||
'simple/Directory.cxx',
|
||||
'simple/Song.cxx',
|
||||
'simple/SongSort.cxx',
|
||||
'simple/Mount.cxx',
|
||||
'simple/SimpleDatabasePlugin.cxx',
|
||||
]
|
||||
|
||||
if upnp_dep.found()
|
||||
db_plugins_sources += [
|
||||
'upnp/UpnpDatabasePlugin.cxx',
|
||||
'upnp/Tags.cxx',
|
||||
'upnp/ContentDirectoryService.cxx',
|
||||
'upnp/Directory.cxx',
|
||||
'upnp/Object.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
libmpdclient_dep = dependency('libmpdclient', version: '>= 2.9', required: get_option('libmpdclient'))
|
||||
conf.set('ENABLE_LIBMPDCLIENT', libmpdclient_dep.found())
|
||||
if libmpdclient_dep.found()
|
||||
db_plugins_sources += 'ProxyDatabasePlugin.cxx'
|
||||
endif
|
||||
|
||||
db_plugins = static_library(
|
||||
'db_plugins',
|
||||
db_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
upnp_dep,
|
||||
libmpdclient_dep,
|
||||
],
|
||||
)
|
||||
|
||||
db_plugins_dep = declare_dependency(
|
||||
link_with: db_plugins,
|
||||
dependencies: [
|
||||
db_api_dep,
|
||||
storage_api_dep,
|
||||
config_dep,
|
||||
],
|
||||
)
|
32
src/decoder/meson.build
Normal file
32
src/decoder/meson.build
Normal file
@@ -0,0 +1,32 @@
|
||||
decoder_api = static_library(
|
||||
'decoder_api',
|
||||
'DecoderAPI.cxx',
|
||||
'Reader.cxx',
|
||||
'DecoderBuffer.cxx',
|
||||
'DecoderPlugin.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
decoder_api_dep = declare_dependency(
|
||||
link_with: decoder_api,
|
||||
dependencies: [
|
||||
tag_dep,
|
||||
config_dep,
|
||||
input_api_dep,
|
||||
],
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
decoder_glue = static_library(
|
||||
'decoder_glue',
|
||||
'DecoderList.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
decoder_glue_dep = declare_dependency(
|
||||
link_with: decoder_glue,
|
||||
dependencies: [
|
||||
decoder_plugins_dep,
|
||||
],
|
||||
)
|
196
src/decoder/plugins/meson.build
Normal file
196
src/decoder/plugins/meson.build
Normal file
@@ -0,0 +1,196 @@
|
||||
decoder_plugins_sources = [
|
||||
'PcmDecoderPlugin.cxx',
|
||||
]
|
||||
|
||||
if get_option('dsd')
|
||||
decoder_plugins_sources += [
|
||||
'HybridDsdDecoderPlugin.cxx',
|
||||
'DsdiffDecoderPlugin.cxx',
|
||||
'DsfDecoderPlugin.cxx',
|
||||
'DsdLib.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
if ffmpeg_dep.found()
|
||||
decoder_plugins_sources += [
|
||||
'FfmpegIo.cxx',
|
||||
'FfmpegMetaData.cxx',
|
||||
'FfmpegDecoderPlugin.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
adplug_dep = dependency('adplug', required: get_option('adplug'))
|
||||
conf.set('ENABLE_ADPLUG', adplug_dep.found())
|
||||
if adplug_dep.found()
|
||||
decoder_plugins_sources += 'AdPlugDecoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_FLAC', flac_dep.found())
|
||||
if flac_dep.found()
|
||||
decoder_plugins_sources += [
|
||||
'FlacDecoderPlugin.cxx',
|
||||
'FlacInput.cxx',
|
||||
'FlacPcm.cxx',
|
||||
'FlacDomain.cxx',
|
||||
'FlacCommon.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_VORBIS_DECODER', libvorbis_dep.found())
|
||||
if libvorbis_dep.found()
|
||||
decoder_plugins_sources += [
|
||||
'VorbisDecoderPlugin.cxx',
|
||||
'VorbisDomain.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_OPUS', libopus_dep.found())
|
||||
if libopus_dep.found()
|
||||
decoder_plugins_sources += [
|
||||
'OpusDecoderPlugin.cxx',
|
||||
'OpusDomain.cxx',
|
||||
'OpusHead.cxx',
|
||||
'OpusTags.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
if ogg_dep.found()
|
||||
decoder_plugins_sources += 'OggDecoder.cxx'
|
||||
endif
|
||||
|
||||
if xiph_dep.found()
|
||||
decoder_plugins_sources += 'OggCodec.cxx'
|
||||
endif
|
||||
|
||||
fluidsynth_dep = dependency('fluidsynth', version: '>= 1.1', required: get_option('fluidsynth'))
|
||||
conf.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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
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())
|
||||
if wildmidi_dep.found()
|
||||
decoder_plugins_sources += 'WildmidiDecoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
if not get_option('sidplay').disabled()
|
||||
libsidplayfp_dep = dependency('libsidplayfp', required: false)
|
||||
conf.set('HAVE_SIDPLAYFP', libsidplayfp_dep.found())
|
||||
|
||||
if libsidplayfp_dep.found()
|
||||
libsidplay_dep = libsidplayfp_dep
|
||||
else
|
||||
libsidplay2_dep = dependency('libsidplay2', required: false)
|
||||
if libsidplay2_dep.found()
|
||||
libsidutils_dep = dependency('libsidutils')
|
||||
libresid_builder_dep = compiler.find_library('resid-builder')
|
||||
libsidplay_dep = declare_dependency(dependencies: [libsidplay2_dep, libsidutils_dep, libresid_builder_dep])
|
||||
elif get_option('sidplay').enabled()
|
||||
error('Neither libsidplayfp nor libsidplay2 found')
|
||||
else
|
||||
libsidplay_dep = libsidplay2_dep
|
||||
endif
|
||||
endif
|
||||
else
|
||||
libsidplay_dep = dependency('', required: false)
|
||||
endif
|
||||
conf.set('ENABLE_SIDPLAY', libsidplay_dep.found())
|
||||
if libsidplay_dep.found()
|
||||
decoder_plugins_sources += 'SidplayDecoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
decoder_plugins = static_library(
|
||||
'decoder_plugins',
|
||||
decoder_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
adplug_dep,
|
||||
ffmpeg_dep,
|
||||
flac_dep,
|
||||
fluidsynth_dep,
|
||||
libaudiofile_dep,
|
||||
libfaad_dep,
|
||||
libgme_dep,
|
||||
libmad_dep,
|
||||
libmikmod_dep,
|
||||
libmodplug_dep,
|
||||
libmpcdec_dep,
|
||||
libmpg123_dep,
|
||||
libopus_dep,
|
||||
libsidplay_dep,
|
||||
libsndfile_dep,
|
||||
libvorbis_dep,
|
||||
ogg_dep,
|
||||
wavpack_dep,
|
||||
wildmidi_dep,
|
||||
],
|
||||
)
|
||||
|
||||
decoder_plugins_dep = declare_dependency(
|
||||
link_with: decoder_plugins,
|
||||
dependencies: [
|
||||
decoder_api_dep,
|
||||
pcm_dep,
|
||||
],
|
||||
)
|
25
src/encoder/meson.build
Normal file
25
src/encoder/meson.build
Normal file
@@ -0,0 +1,25 @@
|
||||
conf.set('ENABLE_ENCODER', need_encoder)
|
||||
|
||||
if not need_encoder
|
||||
encoder_glue_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
encoder_api_dep = declare_dependency()
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
encoder_glue = static_library(
|
||||
'encoder_glue',
|
||||
'Configured.cxx',
|
||||
'ToOutputStream.cxx',
|
||||
'EncoderList.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
encoder_glue_dep = declare_dependency(
|
||||
link_with: encoder_glue,
|
||||
dependencies: [
|
||||
encoder_plugins_dep,
|
||||
],
|
||||
)
|
66
src/encoder/plugins/meson.build
Normal file
66
src/encoder/plugins/meson.build
Normal file
@@ -0,0 +1,66 @@
|
||||
encoder_plugins_sources = [
|
||||
'NullEncoderPlugin.cxx',
|
||||
]
|
||||
|
||||
conf.set('ENABLE_FLAC_ENCODER', flac_dep.found())
|
||||
if flac_dep.found()
|
||||
encoder_plugins_sources += 'FlacEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
if libopus_dep.found()
|
||||
encoder_plugins_sources += 'OpusEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_VORBISENC', libvorbisenc_dep.found())
|
||||
if libvorbisenc_dep.found()
|
||||
encoder_plugins_sources += 'VorbisEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
liblame_dep = c_compiler.find_library('mp3lame', required: get_option('lame'))
|
||||
conf.set('ENABLE_LAME', liblame_dep.found())
|
||||
if liblame_dep.found()
|
||||
encoder_plugins_sources += 'LameEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
libtwolame_dep = dependency('twolame', required: get_option('twolame'))
|
||||
conf.set('ENABLE_TWOLAME', libtwolame_dep.found())
|
||||
if libtwolame_dep.found()
|
||||
encoder_plugins_sources += 'TwolameEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
libshine_dep = dependency('shine', version: '>= 3.1', required: get_option('shine'))
|
||||
conf.set('ENABLE_SHINE', libshine_dep.found())
|
||||
if libshine_dep.found()
|
||||
encoder_plugins_sources += 'ShineEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_WAVE_ENCODER', get_option('wave_encoder'))
|
||||
if get_option('wave_encoder')
|
||||
encoder_plugins_sources += 'WaveEncoderPlugin.cxx'
|
||||
endif
|
||||
|
||||
encoder_plugins = static_library(
|
||||
'encoder_plugins',
|
||||
encoder_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
flac_dep,
|
||||
ogg_dep,
|
||||
libopus_dep,
|
||||
libvorbisenc_dep,
|
||||
libvorbis_dep,
|
||||
liblame_dep,
|
||||
libtwolame_dep,
|
||||
libshine_dep,
|
||||
],
|
||||
)
|
||||
|
||||
encoder_plugins_dep = declare_dependency(
|
||||
link_with: encoder_plugins,
|
||||
dependencies: [
|
||||
encoder_api_dep,
|
||||
tag_dep,
|
||||
pcm_dep,
|
||||
config_dep,
|
||||
],
|
||||
)
|
28
src/event/meson.build
Normal file
28
src/event/meson.build
Normal file
@@ -0,0 +1,28 @@
|
||||
event = static_library(
|
||||
'event',
|
||||
'PollGroupPoll.cxx',
|
||||
'PollGroupWinSelect.cxx',
|
||||
'SignalMonitor.cxx',
|
||||
'TimerEvent.cxx',
|
||||
'IdleMonitor.cxx',
|
||||
'DeferEvent.cxx',
|
||||
'MaskMonitor.cxx',
|
||||
'SocketMonitor.cxx',
|
||||
'BufferedSocket.cxx',
|
||||
'FullyBufferedSocket.cxx',
|
||||
'MultiSocketMonitor.cxx',
|
||||
'ServerSocket.cxx',
|
||||
'Call.cxx',
|
||||
'Thread.cxx',
|
||||
'Loop.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
event_dep = declare_dependency(
|
||||
link_with: event,
|
||||
dependencies: [
|
||||
thread_dep,
|
||||
system_dep,
|
||||
boost_dep,
|
||||
],
|
||||
)
|
28
src/filter/meson.build
Normal file
28
src/filter/meson.build
Normal file
@@ -0,0 +1,28 @@
|
||||
filter_api = static_library(
|
||||
'filter_api',
|
||||
'Observer.cxx',
|
||||
'Filter.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
filter_api_dep = declare_dependency(
|
||||
link_with: filter_api,
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
filter_glue = static_library(
|
||||
'filter_glue',
|
||||
'FilterRegistry.cxx',
|
||||
'Factory.cxx',
|
||||
'LoadOne.cxx',
|
||||
'LoadChain.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
filter_glue_dep = declare_dependency(
|
||||
link_with: filter_glue,
|
||||
dependencies: [
|
||||
filter_plugins_dep,
|
||||
],
|
||||
)
|
22
src/filter/plugins/meson.build
Normal file
22
src/filter/plugins/meson.build
Normal file
@@ -0,0 +1,22 @@
|
||||
filter_plugins = static_library(
|
||||
'filter_plugins',
|
||||
'../../AudioCompress/compress.c',
|
||||
'NullFilterPlugin.cxx',
|
||||
'ChainFilterPlugin.cxx',
|
||||
'AutoConvertFilterPlugin.cxx',
|
||||
'ConvertFilterPlugin.cxx',
|
||||
'RouteFilterPlugin.cxx',
|
||||
'NormalizeFilterPlugin.cxx',
|
||||
'ReplayGainFilterPlugin.cxx',
|
||||
'VolumeFilterPlugin.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
filter_plugins_dep = declare_dependency(
|
||||
link_with: filter_plugins,
|
||||
dependencies: [
|
||||
filter_api_dep,
|
||||
pcm_dep,
|
||||
config_dep,
|
||||
],
|
||||
)
|
52
src/fs/meson.build
Normal file
52
src/fs/meson.build
Normal file
@@ -0,0 +1,52 @@
|
||||
fs_sources = [
|
||||
'Domain.cxx',
|
||||
'Traits.cxx',
|
||||
'Config.cxx',
|
||||
'Charset.cxx',
|
||||
'Path.cxx',
|
||||
'Path2.cxx',
|
||||
'AllocatedPath.cxx',
|
||||
'FileSystem.cxx',
|
||||
'List.cxx',
|
||||
'StandardDirectory.cxx',
|
||||
'CheckFile.cxx',
|
||||
'DirectoryReader.cxx',
|
||||
'io/PeekReader.cxx',
|
||||
'io/FileReader.cxx',
|
||||
'io/BufferedReader.cxx',
|
||||
'io/TextFile.cxx',
|
||||
'io/FileOutputStream.cxx',
|
||||
'io/BufferedOutputStream.cxx',
|
||||
]
|
||||
|
||||
if is_windows
|
||||
shlwapi_dep = c_compiler.find_library('shlwapi')
|
||||
else
|
||||
shlwapi_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if zlib_dep.found()
|
||||
fs_sources += [
|
||||
'io/GunzipReader.cxx',
|
||||
'io/AutoGunzipReader.cxx',
|
||||
'io/GzipOutputStream.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
fs = static_library(
|
||||
'fs',
|
||||
fs_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
zlib_dep,
|
||||
],
|
||||
)
|
||||
|
||||
fs_dep = declare_dependency(
|
||||
link_with: fs,
|
||||
dependencies: [
|
||||
system_dep,
|
||||
icu_dep,
|
||||
shlwapi_dep,
|
||||
],
|
||||
)
|
18
src/haiku/meson.build
Normal file
18
src/haiku/meson.build
Normal file
@@ -0,0 +1,18 @@
|
||||
rc = meson.find_program('rc')
|
||||
xres = meson.find_program('xres')
|
||||
|
||||
rsrc = custom_target(
|
||||
'mpd.rsrc',
|
||||
output: 'mpd.rsrc',
|
||||
input: 'mpd.rdef',
|
||||
command: [rc, '-o', '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
custom_target(
|
||||
'mpd.rsrc',
|
||||
output: 'mpd',
|
||||
input: [mpd, rsrc],
|
||||
command: [xres, '-o', '@OUTPUT@', '--', '@INPUT@'],
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
)
|
44
src/input/meson.build
Normal file
44
src/input/meson.build
Normal file
@@ -0,0 +1,44 @@
|
||||
input_api = static_library(
|
||||
'input_api',
|
||||
'Error.cxx',
|
||||
'InputStream.cxx',
|
||||
'ThreadInputStream.cxx',
|
||||
'AsyncInputStream.cxx',
|
||||
'ProxyInputStream.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
input_api_dep = declare_dependency(
|
||||
link_with: input_api,
|
||||
dependencies: [
|
||||
event_dep,
|
||||
],
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
input_glue = static_library(
|
||||
'input_glue',
|
||||
'Init.cxx',
|
||||
'Registry.cxx',
|
||||
'Open.cxx',
|
||||
'LocalOpen.cxx',
|
||||
'ScanTags.cxx',
|
||||
'Reader.cxx',
|
||||
'TextInputStream.cxx',
|
||||
'ProxyInputStream.cxx',
|
||||
'RewindInputStream.cxx',
|
||||
'BufferedInputStream.cxx',
|
||||
'MaybeBufferedInputStream.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
input_glue_dep = declare_dependency(
|
||||
link_with: input_glue,
|
||||
dependencies: [
|
||||
input_plugins_dep,
|
||||
fs_dep,
|
||||
config_dep,
|
||||
tag_dep,
|
||||
],
|
||||
)
|
110
src/input/plugins/meson.build
Normal file
110
src/input/plugins/meson.build
Normal file
@@ -0,0 +1,110 @@
|
||||
input_plugins_sources = [
|
||||
'FileInputPlugin.cxx',
|
||||
]
|
||||
|
||||
if alsa_dep.found()
|
||||
input_plugins_sources += 'AlsaInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 0.4', required: get_option('cdio_paranoia'))
|
||||
conf.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found())
|
||||
if libcdio_paranoia_dep.found()
|
||||
input_plugins_sources += 'CdioParanoiaInputPlugin.cxx'
|
||||
|
||||
conf.set('HAVE_CDIO_PARANOIA_PARANOIA_H',
|
||||
compiler.has_header('cdio/paranoia/paranoia.h',
|
||||
dependencies: libcdio_paranoia_dep))
|
||||
endif
|
||||
|
||||
if curl_dep.found()
|
||||
input_plugins_sources += [
|
||||
'CurlInputPlugin.cxx',
|
||||
'../IcyInputStream.cxx',
|
||||
'../../IcyMetaDataParser.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
if ffmpeg_dep.found()
|
||||
input_plugins_sources += 'FfmpegInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
libmms_dep = dependency('libmms', version: '>= 0.4', required: get_option('mms'))
|
||||
conf.set('ENABLE_MMS', libmms_dep.found())
|
||||
if libmms_dep.found()
|
||||
input_plugins_sources += 'MmsInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
if nfs_dep.found()
|
||||
input_plugins_sources += 'NfsInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
if smbclient_dep.found()
|
||||
input_plugins_sources += 'SmbclientInputPlugin.cxx'
|
||||
endif
|
||||
|
||||
qobuz_feature = get_option('qobuz')
|
||||
if qobuz_feature.disabled()
|
||||
enable_qobuz = false
|
||||
else
|
||||
enable_qobuz = curl_dep.found() and yajl_dep.found() and gcrypt_dep.found()
|
||||
if not enable_qobuz and qobuz_feature.enabled()
|
||||
error('Qobuz requires CURL, libyajl and libgcrypt')
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_QOBUZ', enable_qobuz)
|
||||
if enable_qobuz
|
||||
input_plugins_sources += [
|
||||
'QobuzClient.cxx',
|
||||
'QobuzErrorParser.cxx',
|
||||
'QobuzLoginRequest.cxx',
|
||||
'QobuzTrackRequest.cxx',
|
||||
'QobuzTagScanner.cxx',
|
||||
'QobuzInputPlugin.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
tidal_feature = get_option('tidal')
|
||||
if tidal_feature.disabled()
|
||||
enable_tidal = false
|
||||
else
|
||||
enable_tidal = curl_dep.found() and yajl_dep.found()
|
||||
if not enable_tidal and tidal_feature.enabled()
|
||||
error('Tidal requires CURL and libyajl')
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_TIDAL', enable_tidal)
|
||||
if enable_tidal
|
||||
input_plugins_sources += [
|
||||
'TidalErrorParser.cxx',
|
||||
'TidalLoginRequest.cxx',
|
||||
'TidalSessionManager.cxx',
|
||||
'TidalTrackRequest.cxx',
|
||||
'TidalTagScanner.cxx',
|
||||
'TidalInputPlugin.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
input_plugins = static_library(
|
||||
'input_plugins',
|
||||
input_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
alsa_dep,
|
||||
curl_dep,
|
||||
ffmpeg_dep,
|
||||
libcdio_paranoia_dep,
|
||||
libmms_dep,
|
||||
nfs_dep,
|
||||
smbclient_dep,
|
||||
yajl_dep,
|
||||
gcrypt_dep,
|
||||
],
|
||||
)
|
||||
|
||||
input_plugins_dep = declare_dependency(
|
||||
link_with: input_plugins,
|
||||
dependencies: [
|
||||
input_api_dep,
|
||||
pcm_dep,
|
||||
],
|
||||
)
|
17
src/java/meson.build
Normal file
17
src/java/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
java = static_library(
|
||||
'java',
|
||||
'Global.cxx',
|
||||
'File.cxx',
|
||||
'String.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
],
|
||||
)
|
||||
|
||||
java_dep = declare_dependency(
|
||||
link_with: java,
|
||||
dependencies: [
|
||||
util_dep,
|
||||
fs_dep,
|
||||
],
|
||||
)
|
31
src/lib/alsa/meson.build
Normal file
31
src/lib/alsa/meson.build
Normal file
@@ -0,0 +1,31 @@
|
||||
if not is_linux
|
||||
alsa_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
libasound_dep = dependency('alsa', version: '>= 0.9.0', required: get_option('alsa'))
|
||||
if not libasound_dep.found()
|
||||
alsa_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_ALSA', true)
|
||||
|
||||
alsa = static_library(
|
||||
'alsa',
|
||||
'Version.cxx',
|
||||
'AllowedFormat.cxx',
|
||||
'HwSetup.cxx',
|
||||
'NonBlock.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libasound_dep,
|
||||
],
|
||||
)
|
||||
|
||||
alsa_dep = declare_dependency(
|
||||
link_with: alsa,
|
||||
dependencies: [
|
||||
event_dep,
|
||||
],
|
||||
)
|
28
src/lib/curl/meson.build
Normal file
28
src/lib/curl/meson.build
Normal file
@@ -0,0 +1,28 @@
|
||||
curl_dep = dependency('libcurl', version: '>= 7.18', required: get_option('curl'))
|
||||
conf.set('ENABLE_CURL', curl_dep.found())
|
||||
if not curl_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
curl = static_library(
|
||||
'curl',
|
||||
'Delegate.cxx',
|
||||
'Version.cxx',
|
||||
'Init.cxx',
|
||||
'Global.cxx',
|
||||
'Request.cxx',
|
||||
'Form.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
curl_dep,
|
||||
],
|
||||
)
|
||||
|
||||
curl_dep = declare_dependency(
|
||||
link_with: curl,
|
||||
dependencies: [
|
||||
event_dep,
|
||||
util_dep,
|
||||
curl_dep,
|
||||
],
|
||||
)
|
37
src/lib/dbus/meson.build
Normal file
37
src/lib/dbus/meson.build
Normal file
@@ -0,0 +1,37 @@
|
||||
dbus_dep = dependency('dbus-1', required: get_option('dbus'))
|
||||
conf.set('ENABLE_DBUS', dbus_dep.found())
|
||||
if not dbus_dep.found()
|
||||
if get_option('udisks').enabled()
|
||||
error('udisks2 requires D-Bus')
|
||||
endif
|
||||
enable_udisks = false
|
||||
conf.set('ENABLE_UDISKS', enable_udisks)
|
||||
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
enable_udisks = not get_option('udisks').disabled()
|
||||
conf.set('ENABLE_UDISKS', enable_udisks)
|
||||
|
||||
dbus = static_library(
|
||||
'dbus',
|
||||
'Connection.cxx',
|
||||
'Error.cxx',
|
||||
'Message.cxx',
|
||||
'UDisks2.cxx',
|
||||
'ScopeMatch.cxx',
|
||||
'Glue.cxx',
|
||||
'Watch.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
dbus_dep,
|
||||
],
|
||||
)
|
||||
|
||||
dbus_dep = declare_dependency(
|
||||
link_with: dbus,
|
||||
dependencies: [
|
||||
dbus_dep,
|
||||
event_dep,
|
||||
],
|
||||
)
|
19
src/lib/expat/meson.build
Normal file
19
src/lib/expat/meson.build
Normal file
@@ -0,0 +1,19 @@
|
||||
expat_dep = dependency('expat', required: get_option('expat'))
|
||||
conf.set('ENABLE_EXPAT', expat_dep.found())
|
||||
if not expat_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
expat = static_library(
|
||||
'expat',
|
||||
'ExpatParser.cxx',
|
||||
'StreamExpatParser.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
expat_dep,
|
||||
],
|
||||
)
|
||||
|
||||
expat_dep = declare_dependency(
|
||||
link_with: expat,
|
||||
)
|
29
src/lib/ffmpeg/meson.build
Normal file
29
src/lib/ffmpeg/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
libavformat_dep = dependency('libavformat', version: '>= 56.1', required: get_option('ffmpeg'))
|
||||
libavcodec_dep = dependency('libavcodec', version: '>= 56.1', required: get_option('ffmpeg'))
|
||||
libavutil_dep = dependency('libavutil', version: '>= 54.3', required: get_option('ffmpeg'))
|
||||
|
||||
enable_ffmpeg = libavformat_dep.found() and libavcodec_dep.found() and libavutil_dep.found()
|
||||
conf.set('ENABLE_FFMPEG', enable_ffmpeg)
|
||||
if not enable_ffmpeg
|
||||
ffmpeg_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
ffmpeg = static_library(
|
||||
'ffmpeg',
|
||||
'Init.cxx',
|
||||
'LogError.cxx',
|
||||
'LogCallback.cxx',
|
||||
'Error.cxx',
|
||||
'Domain.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libavformat_dep,
|
||||
libavcodec_dep,
|
||||
libavutil_dep,
|
||||
],
|
||||
)
|
||||
|
||||
ffmpeg_dep = declare_dependency(
|
||||
link_with: ffmpeg,
|
||||
)
|
20
src/lib/gcrypt/meson.build
Normal file
20
src/lib/gcrypt/meson.build
Normal file
@@ -0,0 +1,20 @@
|
||||
gcrypt_dep = c_compiler.find_library('gcrypt', required: get_option('qobuz'))
|
||||
if not gcrypt_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
gcrypt = static_library(
|
||||
'gcrypt',
|
||||
'MD5.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
gcrypt_dep,
|
||||
],
|
||||
)
|
||||
|
||||
gcrypt_dep = declare_dependency(
|
||||
link_with: gcrypt,
|
||||
dependencies: [
|
||||
gcrypt_dep,
|
||||
],
|
||||
)
|
42
src/lib/icu/meson.build
Normal file
42
src/lib/icu/meson.build
Normal file
@@ -0,0 +1,42 @@
|
||||
icu_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
|
||||
conf.set('HAVE_ICU', icu_dep.found())
|
||||
|
||||
icu_sources = [
|
||||
'CaseFold.cxx',
|
||||
'Compare.cxx',
|
||||
'Collate.cxx',
|
||||
'Converter.cxx',
|
||||
]
|
||||
|
||||
if is_windows
|
||||
icu_sources += 'Win32.cxx'
|
||||
endif
|
||||
|
||||
if icu_dep.found()
|
||||
icu_sources += [
|
||||
'Util.cxx',
|
||||
'Init.cxx',
|
||||
]
|
||||
elif not get_option('iconv').disabled()
|
||||
have_iconv = compiler.has_function('iconv')
|
||||
conf.set('HAVE_ICONV', have_iconv)
|
||||
if get_option('iconv').enabled()
|
||||
error('iconv() not available')
|
||||
endif
|
||||
endif
|
||||
|
||||
icu = static_library(
|
||||
'icu',
|
||||
icu_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
icu_dep,
|
||||
],
|
||||
)
|
||||
|
||||
icu_dep = declare_dependency(
|
||||
link_with: icu,
|
||||
dependencies: [
|
||||
util_dep,
|
||||
],
|
||||
)
|
27
src/lib/nfs/meson.build
Normal file
27
src/lib/nfs/meson.build
Normal file
@@ -0,0 +1,27 @@
|
||||
nfs_dep = dependency('libnfs', version: '>= 1.11', required: get_option('nfs'))
|
||||
conf.set('ENABLE_NFS', nfs_dep.found())
|
||||
if not nfs_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
nfs = static_library(
|
||||
'nfs',
|
||||
'Connection.cxx',
|
||||
'Error.cxx',
|
||||
'Manager.cxx',
|
||||
'Glue.cxx',
|
||||
'Base.cxx',
|
||||
'FileReader.cxx',
|
||||
'Blocking.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
nfs_dep,
|
||||
],
|
||||
)
|
||||
|
||||
nfs_dep = declare_dependency(
|
||||
link_with: nfs,
|
||||
dependencies: [
|
||||
nfs_dep,
|
||||
],
|
||||
)
|
15
src/lib/oss/meson.build
Normal file
15
src/lib/oss/meson.build
Normal file
@@ -0,0 +1,15 @@
|
||||
enable_oss = get_option('oss')
|
||||
if enable_oss.disabled()
|
||||
enable_oss = false
|
||||
elif enable_oss.auto() and alsa_dep.found()
|
||||
# don't bother auto-enabling OSS if ALSA is available
|
||||
enable_oss = false
|
||||
elif compiler.has_header('sys/soundcard.h') or compiler.has_header('soundcard.h')
|
||||
enable_oss = true
|
||||
elif enable_oss.auto()
|
||||
enable_oss = false
|
||||
else
|
||||
error('sys/soundcard.h not found')
|
||||
endif
|
||||
|
||||
conf.set('HAVE_OSS', enable_oss)
|
23
src/lib/pulse/meson.build
Normal file
23
src/lib/pulse/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
pulse_dep = dependency('libpulse', version: '>= 0.9.16', required: get_option('pulse'))
|
||||
conf.set('ENABLE_PULSE', pulse_dep.found())
|
||||
if not pulse_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
pulse = static_library(
|
||||
'pulse',
|
||||
'LogError.cxx',
|
||||
'Error.cxx',
|
||||
'Domain.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
pulse_dep,
|
||||
],
|
||||
)
|
||||
|
||||
pulse_dep = declare_dependency(
|
||||
link_with: pulse,
|
||||
dependencies: [
|
||||
pulse_dep,
|
||||
],
|
||||
)
|
2
src/lib/roar/meson.build
Normal file
2
src/lib/roar/meson.build
Normal file
@@ -0,0 +1,2 @@
|
||||
libroar_dep = dependency('libroar', version: '>= 0.4.0', required: get_option('roar'))
|
||||
conf.set('ENABLE_ROAR', libroar_dep.found())
|
23
src/lib/smbclient/meson.build
Normal file
23
src/lib/smbclient/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
smbclient_dep = dependency('smbclient', version: '>= 0.2', required: get_option('smbclient'))
|
||||
conf.set('ENABLE_SMBCLIENT', smbclient_dep.found())
|
||||
if not smbclient_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
smbclient = static_library(
|
||||
'smbclient',
|
||||
'Domain.cxx',
|
||||
'Mutex.cxx',
|
||||
'Init.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
smbclient_dep,
|
||||
],
|
||||
)
|
||||
|
||||
smbclient_dep = declare_dependency(
|
||||
link_with: smbclient,
|
||||
dependencies: [
|
||||
smbclient_dep,
|
||||
],
|
||||
)
|
12
src/lib/sndio/meson.build
Normal file
12
src/lib/sndio/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
libsndio_dep = c_compiler.find_library('sndio', required: get_option('sndio'))
|
||||
if libsndio_dep.found()
|
||||
if c_compiler.has_header_symbol('sndio.h', 'ROAR_VERSION')
|
||||
if get_option('sndio').enabled()
|
||||
error('Found libroarsndio, which is known to be broken.')
|
||||
else
|
||||
warning('Found libroarsndio, which is known to be broken; ignoring it.')
|
||||
libsndio_dep = dependency('', required: false)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_SNDIO', libsndio_dep.found())
|
18
src/lib/sqlite/meson.build
Normal file
18
src/lib/sqlite/meson.build
Normal file
@@ -0,0 +1,18 @@
|
||||
sqlite_dep = dependency('sqlite3', version: '>= 3.7.3', required: get_option('sqlite'))
|
||||
conf.set('ENABLE_SQLITE', sqlite_dep.found())
|
||||
if not sqlite_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
sqlite = static_library(
|
||||
'sqlite',
|
||||
'Error.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
sqlite_dep,
|
||||
],
|
||||
)
|
||||
|
||||
sqlite_dep = declare_dependency(
|
||||
link_with: sqlite,
|
||||
)
|
23
src/lib/systemd/meson.build
Normal file
23
src/lib/systemd/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
if not is_linux or is_android
|
||||
systemd_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
systemd_dep = dependency('libsystemd', required: get_option('systemd'))
|
||||
conf.set('ENABLE_SYSTEMD_DAEMON', systemd_dep.found())
|
||||
if not systemd_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
systemd = static_library(
|
||||
'systemd',
|
||||
'Watchdog.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
systemd_dep,
|
||||
],
|
||||
)
|
||||
|
||||
systemd_dep = declare_dependency(
|
||||
link_with: systemd,
|
||||
)
|
40
src/lib/upnp/meson.build
Normal file
40
src/lib/upnp/meson.build
Normal file
@@ -0,0 +1,40 @@
|
||||
upnp_dep = dependency('libupnp', required: get_option('upnp'))
|
||||
conf.set('ENABLE_UPNP', upnp_dep.found())
|
||||
if not upnp_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
if not curl_dep.found()
|
||||
error('UPnP requires CURL')
|
||||
endif
|
||||
|
||||
if not expat_dep.found()
|
||||
error('UPnP requires expat')
|
||||
endif
|
||||
|
||||
upnp = static_library(
|
||||
'upnp',
|
||||
'Init.cxx',
|
||||
'ClientInit.cxx',
|
||||
'Device.cxx',
|
||||
'ContentDirectoryService.cxx',
|
||||
'Discovery.cxx',
|
||||
'ixmlwrap.cxx',
|
||||
'Util.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
upnp_dep,
|
||||
curl_dep,
|
||||
expat_dep,
|
||||
],
|
||||
)
|
||||
|
||||
upnp_dep = declare_dependency(
|
||||
link_with: upnp,
|
||||
dependencies: [
|
||||
upnp_dep,
|
||||
curl_dep,
|
||||
expat_dep,
|
||||
event_dep,
|
||||
],
|
||||
)
|
21
src/lib/wrap/meson.build
Normal file
21
src/lib/wrap/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
libwrap_option = get_option('libwrap')
|
||||
enable_libwrap = false
|
||||
if not libwrap_option.disabled() and compiler.has_header('tcpd.h') and compiler.compiles('''
|
||||
#include <tcpd.h>
|
||||
bool CheckLibWrap(int fd, const char &progname) {
|
||||
struct request_info req;
|
||||
request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);
|
||||
fromhost(&req);
|
||||
return hosts_access(&req);
|
||||
}
|
||||
''')
|
||||
libwrap_dep = compiler.find_library('wrap', required: libwrap_option)
|
||||
else
|
||||
libwrap_dep = dependency('', required: libwrap_option)
|
||||
endif
|
||||
|
||||
if not libwrap_dep.found() and libwrap_option.enabled()
|
||||
error('libwrap not found')
|
||||
endif
|
||||
|
||||
conf.set('HAVE_LIBWRAP', libwrap_dep.found())
|
81
src/lib/xiph/meson.build
Normal file
81
src/lib/xiph/meson.build
Normal file
@@ -0,0 +1,81 @@
|
||||
libflac_dep = dependency('flac', version: '>= 1.2', required: get_option('flac'))
|
||||
libopus_dep = dependency('opus', required: get_option('opus'))
|
||||
libvorbis_dep = dependency('vorbis', required: get_option('vorbis'))
|
||||
|
||||
if need_encoder
|
||||
libvorbisenc_dep = dependency('vorbisenc', required: get_option('vorbisenc'))
|
||||
else
|
||||
libvorbisenc_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if libopus_dep.found() or libvorbis_dep.found() or libvorbisenc_dep.found()
|
||||
libogg_dep = dependency('ogg')
|
||||
else
|
||||
libogg_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if not libogg_dep.found() or not libflac_dep.found()
|
||||
xiph_dep = dependency('', required: false)
|
||||
ogg_dep = dependency('', required: false)
|
||||
flac_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
xiph = static_library(
|
||||
'xiph',
|
||||
'VorbisComments.cxx',
|
||||
'XiphTags.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
xiph_dep = declare_dependency(
|
||||
link_with: xiph,
|
||||
)
|
||||
|
||||
if libogg_dep.found()
|
||||
ogg = static_library(
|
||||
'ogg',
|
||||
'OggVisitor.cxx',
|
||||
'OggSerial.cxx',
|
||||
'OggSyncState.cxx',
|
||||
'OggFind.cxx',
|
||||
'OggPacket.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libogg_dep,
|
||||
],
|
||||
)
|
||||
|
||||
ogg_dep = declare_dependency(
|
||||
link_with: ogg,
|
||||
dependencies: [
|
||||
xiph_dep,
|
||||
libogg_dep,
|
||||
],
|
||||
)
|
||||
else
|
||||
ogg_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if libflac_dep.found()
|
||||
flac = static_library(
|
||||
'flac',
|
||||
'FlacIOHandle.cxx',
|
||||
'FlacMetadataChain.cxx',
|
||||
'FlacStreamMetadata.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libflac_dep,
|
||||
],
|
||||
)
|
||||
|
||||
flac_dep = declare_dependency(
|
||||
link_with: flac,
|
||||
dependencies: [
|
||||
xiph_dep,
|
||||
libflac_dep,
|
||||
],
|
||||
)
|
||||
else
|
||||
flac_dep = dependency('', required: false)
|
||||
endif
|
21
src/lib/yajl/meson.build
Normal file
21
src/lib/yajl/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
yajl_dep = dependency('yajl', required: get_option('yajl'))
|
||||
if not yajl_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
yajl = static_library(
|
||||
'yajl',
|
||||
'ResponseParser.cxx',
|
||||
'ParseInputStream.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
yajl_dep,
|
||||
],
|
||||
)
|
||||
|
||||
yajl_dep = declare_dependency(
|
||||
link_with: yajl,
|
||||
dependencies: [
|
||||
yajl_dep,
|
||||
],
|
||||
)
|
17
src/lib/zlib/meson.build
Normal file
17
src/lib/zlib/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
zlib_dep = dependency('zlib', required: get_option('zlib'))
|
||||
if not zlib_dep.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
zlib = static_library(
|
||||
'zlib',
|
||||
'Error.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
zlib_dep,
|
||||
],
|
||||
)
|
||||
|
||||
zlib_dep = declare_dependency(
|
||||
link_with: zlib,
|
||||
)
|
18
src/mixer/meson.build
Normal file
18
src/mixer/meson.build
Normal file
@@ -0,0 +1,18 @@
|
||||
mixer_api_dep = declare_dependency()
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
mixer_glue = static_library(
|
||||
'mixer_glue',
|
||||
'MixerControl.cxx',
|
||||
'MixerType.cxx',
|
||||
'MixerAll.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
mixer_glue_dep = declare_dependency(
|
||||
link_with: mixer_glue,
|
||||
dependencies: [
|
||||
mixer_plugins_dep,
|
||||
],
|
||||
)
|
58
src/mixer/plugins/meson.build
Normal file
58
src/mixer/plugins/meson.build
Normal file
@@ -0,0 +1,58 @@
|
||||
mixer_plugins_sources = [
|
||||
'NullMixerPlugin.cxx',
|
||||
'SoftwareMixerPlugin.cxx',
|
||||
]
|
||||
|
||||
if alsa_dep.found()
|
||||
mixer_plugins_sources += [
|
||||
'AlsaMixerPlugin.cxx',
|
||||
'volume_mapping.c',
|
||||
]
|
||||
endif
|
||||
|
||||
if is_haiku
|
||||
mixer_plugins_sources += 'HaikuMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if enable_oss
|
||||
mixer_plugins_sources += 'OssMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if is_darwin
|
||||
mixer_plugins_sources += 'OSXMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if pulse_dep.found()
|
||||
mixer_plugins_sources += 'PulseMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if libroar_dep.found()
|
||||
mixer_plugins_sources += 'RoarMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if libsndio_dep.found()
|
||||
mixer_plugins_sources += 'SndioMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
if is_windows
|
||||
mixer_plugins_sources += 'WinmmMixerPlugin.cxx'
|
||||
endif
|
||||
|
||||
mixer_plugins = static_library(
|
||||
'mixer_plugins',
|
||||
mixer_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
alsa_dep,
|
||||
pulse_dep,
|
||||
libroar_dep,
|
||||
libsndio_dep,
|
||||
]
|
||||
)
|
||||
|
||||
mixer_plugins_dep = declare_dependency(
|
||||
link_with: mixer_plugins,
|
||||
dependencies: [
|
||||
config_dep,
|
||||
],
|
||||
)
|
31
src/neighbor/meson.build
Normal file
31
src/neighbor/meson.build
Normal file
@@ -0,0 +1,31 @@
|
||||
if not get_option('neighbor')
|
||||
conf.set('ENABLE_NEIGHBOR_PLUGINS', false)
|
||||
neighbor_glue_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
neighbor_api_dep = declare_dependency()
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
conf.set('ENABLE_NEIGHBOR_PLUGINS', found_neighbor_plugin)
|
||||
if not found_neighbor_plugin
|
||||
neighbor_glue_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
neighbor_glue = static_library(
|
||||
'neighbor_glue',
|
||||
'Glue.cxx',
|
||||
'Registry.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
neighbor_glue_dep = declare_dependency(
|
||||
link_with: neighbor_glue,
|
||||
dependencies: [
|
||||
neighbor_plugins_dep,
|
||||
config_dep,
|
||||
],
|
||||
)
|
||||
|
40
src/neighbor/plugins/meson.build
Normal file
40
src/neighbor/plugins/meson.build
Normal file
@@ -0,0 +1,40 @@
|
||||
neighbor_plugins_sources = []
|
||||
found_neighbor_plugin = false
|
||||
|
||||
if smbclient_dep.found()
|
||||
neighbor_plugins_sources += 'SmbclientNeighborPlugin.cxx'
|
||||
found_neighbor_plugin = true
|
||||
endif
|
||||
|
||||
if enable_udisks
|
||||
neighbor_plugins_sources += 'UdisksNeighborPlugin.cxx'
|
||||
found_neighbor_plugin = true
|
||||
endif
|
||||
|
||||
if upnp_dep.found()
|
||||
neighbor_plugins_sources += 'UpnpNeighborPlugin.cxx'
|
||||
found_neighbor_plugin = true
|
||||
endif
|
||||
|
||||
if not found_neighbor_plugin
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
neighbor_plugins = static_library(
|
||||
'neighbor_plugins',
|
||||
neighbor_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
dbus_dep,
|
||||
smbclient_dep,
|
||||
upnp_dep,
|
||||
],
|
||||
)
|
||||
|
||||
neighbor_plugins_dep = declare_dependency(
|
||||
link_with: neighbor_plugins,
|
||||
dependencies: [
|
||||
neighbor_api_dep,
|
||||
event_dep,
|
||||
],
|
||||
)
|
60
src/net/meson.build
Normal file
60
src/net/meson.build
Normal file
@@ -0,0 +1,60 @@
|
||||
have_tcp = get_option('tcp')
|
||||
conf.set('HAVE_TCP', have_tcp)
|
||||
|
||||
if have_tcp and not get_option('ipv6').disabled()
|
||||
if is_windows
|
||||
have_ipv6 = c_compiler.has_header_symbol('winsock2.h', 'AF_INET6')
|
||||
else
|
||||
have_ipv6 = c_compiler.has_header_symbol('sys/socket.h', 'AF_INET6')
|
||||
endif
|
||||
if not have_ipv6 and get_option('ipv6').enabled()
|
||||
error('IPv6 not supported by OS')
|
||||
endif
|
||||
|
||||
conf.set('HAVE_STRUCT_SOCKADDR_IN_SIN_LEN', c_compiler.has_member('struct sockaddr_in', 'sin_len', prefix: '''
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif'''))
|
||||
else
|
||||
have_ipv6 = false
|
||||
endif
|
||||
conf.set('HAVE_IPV6', have_ipv6)
|
||||
|
||||
have_local_socket = not is_windows and get_option('local_socket')
|
||||
conf.set('HAVE_UN', have_local_socket)
|
||||
|
||||
if have_local_socket
|
||||
conf.set('HAVE_STRUCT_UCRED', compiler.has_header_symbol('sys/socket.h', 'struct ucred') and compiler.has_header_symbol('sys/socket.h', 'SO_PEERCRED'))
|
||||
conf.set('HAVE_GETPEEREID', compiler.has_function('getpeereid'))
|
||||
endif
|
||||
|
||||
if not have_tcp and not have_local_socket
|
||||
error('Must enable either "tcp" or "local_socket"')
|
||||
endif
|
||||
|
||||
net = static_library(
|
||||
'net',
|
||||
'ToString.cxx',
|
||||
'HostParser.cxx',
|
||||
'Resolver.cxx',
|
||||
'AddressInfo.cxx',
|
||||
'StaticSocketAddress.cxx',
|
||||
'AllocatedSocketAddress.cxx',
|
||||
'IPv4Address.cxx',
|
||||
'IPv6Address.cxx',
|
||||
'SocketAddress.cxx',
|
||||
'SocketUtil.cxx',
|
||||
'SocketDescriptor.cxx',
|
||||
'SocketError.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
net_dep = declare_dependency(
|
||||
link_with: net,
|
||||
dependencies: [
|
||||
system_dep,
|
||||
],
|
||||
)
|
46
src/output/meson.build
Normal file
46
src/output/meson.build
Normal file
@@ -0,0 +1,46 @@
|
||||
output_api = static_library(
|
||||
'output_api',
|
||||
'Interface.cxx',
|
||||
'Timer.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
output_api_dep = declare_dependency(
|
||||
link_with: output_api,
|
||||
dependencies: [
|
||||
filter_plugins_dep,
|
||||
mixer_plugins_dep,
|
||||
],
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
output_glue = static_library(
|
||||
'output_glue',
|
||||
'Defaults.cxx',
|
||||
'Filtered.cxx',
|
||||
'Registry.cxx',
|
||||
'MultipleOutputs.cxx',
|
||||
'SharedPipeConsumer.cxx',
|
||||
'Source.cxx',
|
||||
'Thread.cxx',
|
||||
'Domain.cxx',
|
||||
'Control.cxx',
|
||||
'State.cxx',
|
||||
'Print.cxx',
|
||||
'OutputCommand.cxx',
|
||||
'OutputPlugin.cxx',
|
||||
'Finish.cxx',
|
||||
'Init.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
output_glue_dep = declare_dependency(
|
||||
link_with: output_glue,
|
||||
dependencies: [
|
||||
filter_glue_dep,
|
||||
mixer_plugins_dep,
|
||||
output_plugins_dep,
|
||||
],
|
||||
)
|
||||
|
165
src/output/plugins/meson.build
Normal file
165
src/output/plugins/meson.build
Normal file
@@ -0,0 +1,165 @@
|
||||
output_plugins_sources = [
|
||||
'NullOutputPlugin.cxx',
|
||||
]
|
||||
|
||||
output_plugins_deps = [
|
||||
output_api_dep,
|
||||
config_dep,
|
||||
tag_dep,
|
||||
]
|
||||
|
||||
need_encoder = false
|
||||
|
||||
if alsa_dep.found()
|
||||
output_plugins_sources += 'AlsaOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
libao_dep = dependency('ao', required: get_option('ao'))
|
||||
conf.set('ENABLE_AO', libao_dep.found())
|
||||
if libao_dep.found()
|
||||
output_plugins_sources += 'AoOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
enable_fifo_output = get_option('fifo') and not is_windows
|
||||
conf.set('HAVE_FIFO', enable_fifo_output)
|
||||
if enable_fifo_output
|
||||
output_plugins_sources += 'FifoOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
if is_haiku
|
||||
output_plugins_sources += 'HaikuOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_HTTPD_OUTPUT', get_option('httpd'))
|
||||
if get_option('httpd')
|
||||
output_plugins_sources += [
|
||||
'httpd/IcyMetaDataServer.cxx',
|
||||
'httpd/Page.cxx',
|
||||
'httpd/HttpdClient.cxx',
|
||||
'httpd/HttpdOutputPlugin.cxx',
|
||||
]
|
||||
output_plugins_deps += [ event_dep, net_dep, libwrap_dep ]
|
||||
need_encoder = true
|
||||
endif
|
||||
|
||||
libjack_dep = dependency('jack', version: '>= 0.100', required: get_option('jack'))
|
||||
conf.set('ENABLE_JACK', libjack_dep.found())
|
||||
if libjack_dep.found()
|
||||
output_plugins_sources += 'JackOutputPlugin.cxx'
|
||||
conf.set('HAVE_JACK_SET_INFO_FUNCTION', compiler.has_header_symbol('jack/jack.h', 'jack_set_info_function'))
|
||||
endif
|
||||
|
||||
openal_dep = dependency('', required: false)
|
||||
if not get_option('openal').disabled()
|
||||
if is_darwin
|
||||
if compiler.has_header('OpenAL/al.h')
|
||||
openal_dep = declare_dependency(link_args: ['-framework', 'OpenAL'])
|
||||
endif
|
||||
else
|
||||
openal_dep = dependency('openal', required: false)
|
||||
endif
|
||||
|
||||
if openal_dep.found()
|
||||
output_plugins_sources += 'OpenALOutputPlugin.cxx'
|
||||
elif get_option('openal').enabled()
|
||||
error('OpenAL not available')
|
||||
endif
|
||||
endif
|
||||
conf.set('HAVE_OPENAL', openal_dep.found())
|
||||
|
||||
if enable_oss
|
||||
output_plugins_sources += 'OssOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
if is_darwin
|
||||
output_plugins_sources += 'OSXOutputPlugin.cxx'
|
||||
audiounit_dep = declare_dependency(
|
||||
link_args: [
|
||||
'-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreServices',
|
||||
]
|
||||
)
|
||||
else
|
||||
audiounit_dep = dependency('', required: false)
|
||||
endif
|
||||
conf.set('HAVE_OSX', is_darwin)
|
||||
|
||||
enable_pipe_output = get_option('pipe') and not is_windows
|
||||
conf.set('ENABLE_PIPE_OUTPUT', enable_pipe_output)
|
||||
if enable_pipe_output
|
||||
output_plugins_sources += 'PipeOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
if pulse_dep.found()
|
||||
output_plugins_sources += 'PulseOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_RECORDER_OUTPUT', get_option('recorder'))
|
||||
if get_option('recorder')
|
||||
output_plugins_sources += 'RecorderOutputPlugin.cxx'
|
||||
need_encoder = true
|
||||
endif
|
||||
|
||||
if libroar_dep.found()
|
||||
output_plugins_sources += 'RoarOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
libshout_dep = dependency('shout', required: get_option('shout'))
|
||||
conf.set('HAVE_SHOUT', libshout_dep.found())
|
||||
if libshout_dep.found()
|
||||
output_plugins_sources += 'ShoutOutputPlugin.cxx'
|
||||
need_encoder = true
|
||||
endif
|
||||
|
||||
if is_android
|
||||
sles_dep = c_compiler.find_library('OpenSLES')
|
||||
output_plugins_sources += 'sles/SlesOutputPlugin.cxx'
|
||||
else
|
||||
sles_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
if libsndio_dep.found()
|
||||
output_plugins_sources += 'SndioOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
enable_solaris_output = get_option('solaris_output')
|
||||
if enable_solaris_output.auto()
|
||||
enable_solaris_output = host_machine.system() == 'sunos' or host_machine.system() == 'solaris'
|
||||
else
|
||||
enable_solaris_output = enable_solaris_output.enabled()
|
||||
endif
|
||||
conf.set('ENABLE_SOLARIS_OUTPUT', enable_solaris_output)
|
||||
if enable_solaris_output
|
||||
output_plugins_sources += 'SolarisOutputPlugin.cxx'
|
||||
endif
|
||||
|
||||
conf.set('ENABLE_WINMM_OUTPUT', is_windows)
|
||||
if is_windows
|
||||
output_plugins_sources += 'WinmmOutputPlugin.cxx'
|
||||
winmm_dep = c_compiler.find_library('winmm')
|
||||
else
|
||||
winmm_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
output_plugins = static_library(
|
||||
'output_plugins',
|
||||
output_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
alsa_dep,
|
||||
audiounit_dep,
|
||||
libao_dep,
|
||||
libjack_dep,
|
||||
pulse_dep,
|
||||
libroar_dep,
|
||||
libshout_dep,
|
||||
libsndio_dep,
|
||||
openal_dep,
|
||||
sles_dep,
|
||||
winmm_dep,
|
||||
],
|
||||
)
|
||||
|
||||
output_plugins_dep = declare_dependency(
|
||||
link_with: output_plugins,
|
||||
dependencies: output_plugins_deps,
|
||||
)
|
72
src/pcm/meson.build
Normal file
72
src/pcm/meson.build
Normal file
@@ -0,0 +1,72 @@
|
||||
pcm_sources = [
|
||||
'../CheckAudioFormat.cxx',
|
||||
'../AudioFormat.cxx',
|
||||
'../AudioParser.cxx',
|
||||
'SampleFormat.cxx',
|
||||
'Interleave.cxx',
|
||||
'PcmBuffer.cxx',
|
||||
'PcmExport.cxx',
|
||||
'PcmConvert.cxx',
|
||||
'PcmDop.cxx',
|
||||
'Volume.cxx',
|
||||
'Silence.cxx',
|
||||
'PcmMix.cxx',
|
||||
'PcmChannels.cxx',
|
||||
'PcmPack.cxx',
|
||||
'PcmFormat.cxx',
|
||||
'FormatConverter.cxx',
|
||||
'ChannelsConverter.cxx',
|
||||
'Order.cxx',
|
||||
'GlueResampler.cxx',
|
||||
'FallbackResampler.cxx',
|
||||
'ConfiguredResampler.cxx',
|
||||
'PcmDither.cxx',
|
||||
]
|
||||
|
||||
if get_option('dsd')
|
||||
pcm_sources += [
|
||||
'Dsd16.cxx',
|
||||
'Dsd32.cxx',
|
||||
'PcmDsd.cxx',
|
||||
'dsd2pcm/dsd2pcm.c',
|
||||
]
|
||||
|
||||
executable(
|
||||
'dsd2pcm',
|
||||
'dsd2pcm/main.cpp',
|
||||
'dsd2pcm/dsd2pcm.c',
|
||||
'dsd2pcm/noiseshape.c',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
util_dep,
|
||||
],
|
||||
install: false,
|
||||
)
|
||||
endif
|
||||
|
||||
libsamplerate_dep = dependency('samplerate', version: '>= 0.1.3', required: get_option('libsamplerate'))
|
||||
if libsamplerate_dep.found()
|
||||
conf.set('ENABLE_LIBSAMPLERATE', true)
|
||||
pcm_sources += 'LibsamplerateResampler.cxx'
|
||||
endif
|
||||
|
||||
soxr_dep = dependency('soxr', required: get_option('soxr'))
|
||||
if soxr_dep.found()
|
||||
conf.set('ENABLE_SOXR', true)
|
||||
pcm_sources += 'SoxrResampler.cxx'
|
||||
endif
|
||||
|
||||
pcm = static_library(
|
||||
'pcm',
|
||||
pcm_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
util_dep,
|
||||
libsamplerate_dep,
|
||||
soxr_dep,
|
||||
],
|
||||
)
|
||||
|
||||
pcm_dep = declare_dependency(
|
||||
link_with: pcm,
|
||||
)
|
24
src/playlist/meson.build
Normal file
24
src/playlist/meson.build
Normal file
@@ -0,0 +1,24 @@
|
||||
playlist_api = static_library(
|
||||
'playlist_api',
|
||||
'MemorySongEnumerator.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
playlist_api_dep = declare_dependency(
|
||||
link_with: playlist_api,
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
playlist_glue = static_library(
|
||||
'playlist_glue',
|
||||
'PlaylistRegistry.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
playlist_glue_dep = declare_dependency(
|
||||
link_with: playlist_glue,
|
||||
dependencies: [
|
||||
playlist_plugins_dep,
|
||||
],
|
||||
)
|
61
src/playlist/plugins/meson.build
Normal file
61
src/playlist/plugins/meson.build
Normal file
@@ -0,0 +1,61 @@
|
||||
playlist_plugins_sources = [
|
||||
'ExtM3uPlaylistPlugin.cxx',
|
||||
'M3uPlaylistPlugin.cxx',
|
||||
'PlsPlaylistPlugin.cxx',
|
||||
]
|
||||
|
||||
playlist_plugins_deps = [
|
||||
expat_dep,
|
||||
flac_dep,
|
||||
]
|
||||
|
||||
conf.set('ENABLE_CUE', get_option('cue'))
|
||||
if get_option('cue')
|
||||
playlist_plugins_sources += [
|
||||
'../cue/CueParser.cxx',
|
||||
'CuePlaylistPlugin.cxx',
|
||||
'EmbeddedCuePlaylistPlugin.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
if expat_dep.found()
|
||||
playlist_plugins_sources += [
|
||||
'XspfPlaylistPlugin.cxx',
|
||||
'AsxPlaylistPlugin.cxx',
|
||||
'RssPlaylistPlugin.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
if flac_dep.found()
|
||||
playlist_plugins_sources += 'FlacPlaylistPlugin.cxx'
|
||||
endif
|
||||
|
||||
soundcloud_feature = get_option('soundcloud')
|
||||
if soundcloud_feature.disabled()
|
||||
enable_soundcloud = false
|
||||
else
|
||||
enable_soundcloud = curl_dep.found() and yajl_dep.found()
|
||||
if not enable_soundcloud and soundcloud_feature.enabled()
|
||||
error('SoundCloud requires CURL and libyajl')
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_SOUNDCLOUD', enable_soundcloud)
|
||||
if enable_soundcloud
|
||||
playlist_plugins_sources += 'SoundCloudPlaylistPlugin.cxx'
|
||||
playlist_plugins_deps += yajl_dep
|
||||
endif
|
||||
|
||||
playlist_plugins = static_library(
|
||||
'playlist_plugins',
|
||||
playlist_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: playlist_plugins_deps,
|
||||
)
|
||||
|
||||
playlist_plugins_dep = declare_dependency(
|
||||
link_with: playlist_plugins,
|
||||
dependencies: [
|
||||
playlist_api_dep,
|
||||
tag_dep,
|
||||
],
|
||||
)
|
24
src/song/meson.build
Normal file
24
src/song/meson.build
Normal file
@@ -0,0 +1,24 @@
|
||||
song = static_library(
|
||||
'song',
|
||||
'DetachedSong.cxx',
|
||||
'StringFilter.cxx',
|
||||
'UriSongFilter.cxx',
|
||||
'BaseSongFilter.cxx',
|
||||
'TagSongFilter.cxx',
|
||||
'ModifiedSinceSongFilter.cxx',
|
||||
'AudioFormatSongFilter.cxx',
|
||||
'AndSongFilter.cxx',
|
||||
'OptimizeFilter.cxx',
|
||||
'Filter.cxx',
|
||||
'LightSong.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
song_dep = declare_dependency(
|
||||
link_with: song,
|
||||
dependencies: [
|
||||
icu_dep,
|
||||
tag_dep,
|
||||
util_dep,
|
||||
],
|
||||
)
|
29
src/storage/meson.build
Normal file
29
src/storage/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
storage_api = static_library(
|
||||
'storage_api',
|
||||
'StorageInterface.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
storage_api_dep = declare_dependency(
|
||||
link_with: storage_api,
|
||||
)
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
storage_glue = static_library(
|
||||
'storage_glue',
|
||||
'Registry.cxx',
|
||||
'CompositeStorage.cxx',
|
||||
'MemoryDirectoryReader.cxx',
|
||||
'Configured.cxx',
|
||||
'StorageState.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
storage_glue_dep = declare_dependency(
|
||||
link_with: storage_glue,
|
||||
dependencies: [
|
||||
storage_plugins_dep,
|
||||
],
|
||||
)
|
||||
|
61
src/storage/plugins/meson.build
Normal file
61
src/storage/plugins/meson.build
Normal file
@@ -0,0 +1,61 @@
|
||||
storage_plugins_sources = [
|
||||
'LocalStorage.cxx',
|
||||
]
|
||||
|
||||
webdav_option = get_option('webdav')
|
||||
enable_webdav = false
|
||||
if not webdav_option.disabled()
|
||||
enable_webdav = true
|
||||
|
||||
if not curl_dep.found()
|
||||
if webdav_option.enabled()
|
||||
error('WebDAV requires CURL')
|
||||
endif
|
||||
enable_webdav = false
|
||||
endif
|
||||
|
||||
if not expat_dep.found()
|
||||
if webdav_option.enabled()
|
||||
error('WebDAV requires Expat')
|
||||
endif
|
||||
enable_webdav = false
|
||||
endif
|
||||
|
||||
if enable_webdav
|
||||
storage_plugins_sources += 'CurlStorage.cxx'
|
||||
endif
|
||||
endif
|
||||
conf.set('ENABLE_WEBDAV', enable_webdav)
|
||||
|
||||
if nfs_dep.found()
|
||||
storage_plugins_sources += 'NfsStorage.cxx'
|
||||
endif
|
||||
|
||||
if smbclient_dep.found()
|
||||
storage_plugins_sources += 'SmbclientStorage.cxx'
|
||||
endif
|
||||
|
||||
if enable_udisks
|
||||
storage_plugins_sources += 'UdisksStorage.cxx'
|
||||
endif
|
||||
|
||||
storage_plugins = static_library(
|
||||
'storage_plugins',
|
||||
storage_plugins_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
curl_dep,
|
||||
dbus_dep,
|
||||
expat_dep,
|
||||
nfs_dep,
|
||||
smbclient_dep,
|
||||
],
|
||||
)
|
||||
|
||||
storage_plugins_dep = declare_dependency(
|
||||
link_with: storage_plugins,
|
||||
dependencies: [
|
||||
storage_api_dep,
|
||||
fs_dep,
|
||||
],
|
||||
)
|
34
src/system/meson.build
Normal file
34
src/system/meson.build
Normal file
@@ -0,0 +1,34 @@
|
||||
system_sources = [
|
||||
'FatalError.cxx',
|
||||
'FileDescriptor.cxx',
|
||||
'Open.cxx',
|
||||
'EventPipe.cxx',
|
||||
'Clock.cxx',
|
||||
]
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
system_sources += [
|
||||
'EventFD.cxx',
|
||||
'SignalFD.cxx',
|
||||
'EpollFD.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
system = static_library(
|
||||
'system',
|
||||
system_sources,
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
if is_windows
|
||||
winsock_dep = c_compiler.find_library('ws2_32')
|
||||
else
|
||||
winsock_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
system_dep = declare_dependency(
|
||||
link_with: system,
|
||||
dependencies: [
|
||||
winsock_dep,
|
||||
],
|
||||
)
|
50
src/tag/meson.build
Normal file
50
src/tag/meson.build
Normal file
@@ -0,0 +1,50 @@
|
||||
tag_sources = [
|
||||
'Tag.cxx',
|
||||
'Builder.cxx',
|
||||
'Handler.cxx',
|
||||
'Settings.cxx',
|
||||
'Config.cxx',
|
||||
'ParseName.cxx',
|
||||
'Names.c',
|
||||
'FixString.cxx',
|
||||
'Pool.cxx',
|
||||
'Table.cxx',
|
||||
'Set.cxx',
|
||||
'Format.cxx',
|
||||
'VorbisComment.cxx',
|
||||
'ReplayGain.cxx',
|
||||
'MixRamp.cxx',
|
||||
'Generic.cxx',
|
||||
'Id3MusicBrainz.cxx',
|
||||
'ApeLoader.cxx',
|
||||
'ApeReplayGain.cxx',
|
||||
'ApeTag.cxx',
|
||||
]
|
||||
|
||||
libid3tag_dep = dependency('id3tag', required: get_option('id3tag'))
|
||||
conf.set('ENABLE_ID3TAG', libid3tag_dep.found())
|
||||
if libid3tag_dep.found()
|
||||
tag_sources += [
|
||||
'Id3Load.cxx',
|
||||
'Id3Scan.cxx',
|
||||
'Rva2.cxx',
|
||||
'Riff.cxx',
|
||||
'Aiff.cxx',
|
||||
]
|
||||
endif
|
||||
|
||||
tag = static_library(
|
||||
'tag',
|
||||
tag_sources,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libid3tag_dep,
|
||||
],
|
||||
)
|
||||
|
||||
tag_dep = declare_dependency(
|
||||
link_with: tag,
|
||||
dependencies: [
|
||||
util_dep,
|
||||
],
|
||||
)
|
13
src/thread/meson.build
Normal file
13
src/thread/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
thread = static_library(
|
||||
'thread',
|
||||
'Util.cxx',
|
||||
'Thread.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
dependency('threads')
|
||||
],
|
||||
)
|
||||
|
||||
thread_dep = declare_dependency(
|
||||
link_with: thread,
|
||||
)
|
37
src/util/meson.build
Normal file
37
src/util/meson.build
Normal file
@@ -0,0 +1,37 @@
|
||||
util = static_library(
|
||||
'util',
|
||||
'Exception.cxx',
|
||||
'Alloc.cxx',
|
||||
'UTF8.cxx',
|
||||
'HexFormat.cxx',
|
||||
'MimeType.cxx',
|
||||
'StringView.cxx',
|
||||
'AllocatedString.cxx',
|
||||
'TruncateString.cxx',
|
||||
'StringStrip.cxx',
|
||||
'StringUtil.cxx',
|
||||
'StringCompare.cxx',
|
||||
'WStringCompare.cxx',
|
||||
'DivideString.cxx',
|
||||
'SplitString.cxx',
|
||||
'FormatString.cxx',
|
||||
'Tokenizer.cxx',
|
||||
'TimeParser.cxx',
|
||||
'TimeConvert.cxx',
|
||||
'TimeISO8601.cxx',
|
||||
'UriUtil.cxx',
|
||||
'LazyRandomEngine.cxx',
|
||||
'HugeAllocator.cxx',
|
||||
'PeakBuffer.cxx',
|
||||
'PrintException.cxx',
|
||||
'SparseBuffer.cxx',
|
||||
'OptionParser.cxx',
|
||||
'ByteReverse.cxx',
|
||||
'format.c',
|
||||
'bit_reverse.c',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
util_dep = declare_dependency(
|
||||
link_with: util,
|
||||
)
|
74
src/zeroconf/meson.build
Normal file
74
src/zeroconf/meson.build
Normal file
@@ -0,0 +1,74 @@
|
||||
zeroconf_option = get_option('zeroconf')
|
||||
|
||||
libavahi_client_dep = dependency('', required: false)
|
||||
|
||||
if zeroconf_option == 'auto'
|
||||
if is_darwin
|
||||
# Bonjour disabled for now because its build is broken
|
||||
#zeroconf_option = 'bonjour'
|
||||
zeroconf_option = 'disabled'
|
||||
elif is_android or is_windows
|
||||
zeroconf_option = 'disabled'
|
||||
elif dbus_dep.found()
|
||||
libavahi_client_dep = dependency('avahi-client', required: false)
|
||||
if libavahi_client_dep.found()
|
||||
zeroconf_option = 'avahi'
|
||||
else
|
||||
zeroconf_option = 'disabled'
|
||||
endif
|
||||
else
|
||||
zeroconf_option = 'disabled'
|
||||
endif
|
||||
endif
|
||||
|
||||
if zeroconf_option == 'disabled'
|
||||
zeroconf_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
if zeroconf_option == 'bonjour'
|
||||
if not compiler.has_header('dns_sd.h')
|
||||
error('dns_sd.h not found')
|
||||
endif
|
||||
|
||||
bonjour_dep = declare_dependency(link_args: ['-framework', 'dnssd'])
|
||||
conf.set('HAVE_BONJOUR', true)
|
||||
|
||||
zeroconf = static_library(
|
||||
'zeroconf_bonjour',
|
||||
'ZeroconfGlue.cxx',
|
||||
'ZeroconfBonjour.cxx',
|
||||
include_directories: inc,
|
||||
)
|
||||
|
||||
zeroconf_dep = declare_dependency(
|
||||
link_with: zeroconf,
|
||||
dependencies: [
|
||||
bonjour_dep,
|
||||
],
|
||||
)
|
||||
else
|
||||
if not libavahi_client_dep.found()
|
||||
libavahi_client_dep = dependency('avahi-client')
|
||||
endif
|
||||
|
||||
conf.set('HAVE_AVAHI', true)
|
||||
|
||||
zeroconf = static_library(
|
||||
'zeroconf_bonjour',
|
||||
'ZeroconfGlue.cxx',
|
||||
'ZeroconfAvahi.cxx',
|
||||
'AvahiPoll.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libavahi_client_dep,
|
||||
dbus_dep,
|
||||
],
|
||||
)
|
||||
|
||||
zeroconf_dep = declare_dependency(
|
||||
link_with: zeroconf,
|
||||
)
|
||||
endif
|
||||
|
||||
conf.set('HAVE_ZEROCONF', true)
|
Reference in New Issue
Block a user