2017-12-29 17:12:55 +01:00
|
|
|
output_plugins_sources = [
|
|
|
|
'NullOutputPlugin.cxx',
|
|
|
|
]
|
|
|
|
|
|
|
|
output_plugins_deps = [
|
|
|
|
output_api_dep,
|
|
|
|
config_dep,
|
|
|
|
tag_dep,
|
2020-01-18 19:45:56 +01:00
|
|
|
log_dep,
|
2017-12-29 17:12:55 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
need_encoder = false
|
|
|
|
|
|
|
|
if alsa_dep.found()
|
|
|
|
output_plugins_sources += 'AlsaOutputPlugin.cxx'
|
2020-07-01 15:24:51 +02:00
|
|
|
output_plugins_deps += event_dep
|
2017-12-29 17:12:55 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
libao_dep = dependency('ao', required: get_option('ao'))
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_AO', libao_dep.found())
|
2017-12-29 17:12:55 +01:00
|
|
|
if libao_dep.found()
|
|
|
|
output_plugins_sources += 'AoOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
|
|
|
enable_fifo_output = get_option('fifo') and not is_windows
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('HAVE_FIFO', enable_fifo_output)
|
2017-12-29 17:12:55 +01:00
|
|
|
if enable_fifo_output
|
|
|
|
output_plugins_sources += 'FifoOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if is_haiku
|
|
|
|
output_plugins_sources += 'HaikuOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_HTTPD_OUTPUT', get_option('httpd'))
|
2017-12-29 17:12:55 +01:00
|
|
|
if get_option('httpd')
|
|
|
|
output_plugins_sources += [
|
|
|
|
'httpd/IcyMetaDataServer.cxx',
|
|
|
|
'httpd/Page.cxx',
|
|
|
|
'httpd/HttpdClient.cxx',
|
|
|
|
'httpd/HttpdOutputPlugin.cxx',
|
|
|
|
]
|
2020-05-30 15:59:53 +02:00
|
|
|
output_plugins_deps += [ event_dep, net_dep, boost_dep ]
|
2017-12-29 17:12:55 +01:00
|
|
|
need_encoder = true
|
|
|
|
endif
|
|
|
|
|
|
|
|
libjack_dep = dependency('jack', version: '>= 0.100', required: get_option('jack'))
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_JACK', libjack_dep.found())
|
2017-12-29 17:12:55 +01:00
|
|
|
if libjack_dep.found()
|
|
|
|
output_plugins_sources += 'JackOutputPlugin.cxx'
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('HAVE_JACK_SET_INFO_FUNCTION', compiler.has_header_symbol('jack/jack.h', 'jack_set_info_function'))
|
2017-12-29 17:12:55 +01:00
|
|
|
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
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('HAVE_OPENAL', openal_dep.found())
|
2017-12-29 17:12:55 +01:00
|
|
|
|
|
|
|
if enable_oss
|
|
|
|
output_plugins_sources += 'OssOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if is_darwin
|
2020-05-28 14:54:30 +02:00
|
|
|
output_plugins_sources += [
|
|
|
|
'OSXOutputPlugin.cxx',
|
|
|
|
]
|
2017-12-29 17:12:55 +01:00
|
|
|
endif
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('HAVE_OSX', is_darwin)
|
2017-12-29 17:12:55 +01:00
|
|
|
|
|
|
|
enable_pipe_output = get_option('pipe') and not is_windows
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_PIPE_OUTPUT', enable_pipe_output)
|
2017-12-29 17:12:55 +01:00
|
|
|
if enable_pipe_output
|
|
|
|
output_plugins_sources += 'PipeOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if pulse_dep.found()
|
|
|
|
output_plugins_sources += 'PulseOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_RECORDER_OUTPUT', get_option('recorder'))
|
2017-12-29 17:12:55 +01:00
|
|
|
if get_option('recorder')
|
|
|
|
output_plugins_sources += 'RecorderOutputPlugin.cxx'
|
|
|
|
need_encoder = true
|
|
|
|
endif
|
|
|
|
|
|
|
|
libshout_dep = dependency('shout', required: get_option('shout'))
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('HAVE_SHOUT', libshout_dep.found())
|
2017-12-29 17:12:55 +01:00
|
|
|
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
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_SOLARIS_OUTPUT', enable_solaris_output)
|
2017-12-29 17:12:55 +01:00
|
|
|
if enable_solaris_output
|
|
|
|
output_plugins_sources += 'SolarisOutputPlugin.cxx'
|
|
|
|
endif
|
|
|
|
|
2020-05-05 14:45:18 +02:00
|
|
|
output_features.set('ENABLE_WINMM_OUTPUT', is_windows)
|
2017-12-29 17:12:55 +01:00
|
|
|
if is_windows
|
|
|
|
output_plugins_sources += 'WinmmOutputPlugin.cxx'
|
|
|
|
winmm_dep = c_compiler.find_library('winmm')
|
|
|
|
else
|
|
|
|
winmm_dep = dependency('', required: false)
|
|
|
|
endif
|
|
|
|
|
2020-05-30 15:59:53 +02:00
|
|
|
output_features.set('ENABLE_WASAPI_OUTPUT', is_windows)
|
|
|
|
if is_windows
|
|
|
|
output_plugins_sources += [
|
|
|
|
'WasapiOutputPlugin.cxx',
|
|
|
|
]
|
|
|
|
wasapi_dep = [
|
|
|
|
c_compiler.find_library('ksuser', required: true),
|
|
|
|
c_compiler.find_library('ole32', required: true),
|
2021-03-05 13:25:24 +01:00
|
|
|
win32_dep,
|
2020-05-30 15:59:53 +02:00
|
|
|
]
|
|
|
|
else
|
|
|
|
wasapi_dep = dependency('', required: false)
|
|
|
|
endif
|
|
|
|
|
2017-12-29 17:12:55 +01:00
|
|
|
output_plugins = static_library(
|
|
|
|
'output_plugins',
|
|
|
|
output_plugins_sources,
|
|
|
|
include_directories: inc,
|
|
|
|
dependencies: [
|
|
|
|
alsa_dep,
|
2020-07-02 13:39:15 +02:00
|
|
|
apple_dep,
|
2017-12-29 17:12:55 +01:00
|
|
|
libao_dep,
|
|
|
|
libjack_dep,
|
|
|
|
pulse_dep,
|
|
|
|
libshout_dep,
|
|
|
|
libsndio_dep,
|
|
|
|
openal_dep,
|
|
|
|
sles_dep,
|
|
|
|
winmm_dep,
|
2020-05-30 15:59:53 +02:00
|
|
|
wasapi_dep,
|
|
|
|
boost_dep,
|
2017-12-29 17:12:55 +01:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
output_plugins_dep = declare_dependency(
|
|
|
|
link_with: output_plugins,
|
|
|
|
dependencies: output_plugins_deps,
|
|
|
|
)
|