util/OptionParser: move to cmdline/

This library will depend on libfmt, and libutil shouldn't depend on
any library.
This commit is contained in:
Max Kellermann 2022-11-29 11:27:59 +01:00
parent cf3f3a7750
commit 45b13fc2a6
13 changed files with 28 additions and 15 deletions

View File

@ -392,6 +392,7 @@ if enable_database
endif
subdir('src/util')
subdir('src/cmdline')
subdir('src/time')
subdir('src/io')
subdir('src/io/uring')
@ -529,6 +530,7 @@ mpd = build_target(
target_type: target_type,
include_directories: inc,
dependencies: [
cmdline_dep,
basic_dep,
config_dep,
dbus_dep,

View File

@ -39,9 +39,9 @@
#include "fs/StandardDirectory.hxx"
#include "event/Features.h"
#include "io/uring/Features.h"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/Domain.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "Version.h"
#ifdef _WIN32

9
src/cmdline/meson.build Normal file
View File

@ -0,0 +1,9 @@
cmdline = static_library(
'cmdline',
'OptionParser.cxx',
include_directories: inc,
)
cmdline_dep = declare_dependency(
link_with: cmdline,
)

View File

@ -22,7 +22,6 @@ util = static_library(
'PeakBuffer.cxx',
'PrintException.cxx',
'SparseBuffer.cxx',
'OptionParser.cxx',
'ByteReverse.cxx',
'format.c',
'BitReverse.cxx',

View File

@ -28,8 +28,8 @@
#include "input/InputStream.hxx"
#include "fs/Path.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/PrintException.hxx"
#include "Log.hxx"
#include "LogBackend.hxx"

View File

@ -294,6 +294,7 @@ run_input = executable(
log_dep,
input_glue_dep,
archive_glue_dep,
cmdline_dep,
],
)
@ -402,6 +403,7 @@ if chromaprint_dep.found()
input_glue_dep,
archive_glue_dep,
chromaprint_dep,
cmdline_dep,
],
)
endif
@ -420,6 +422,7 @@ executable(
decoder_glue_dep,
input_glue_dep,
archive_glue_dep,
cmdline_dep,
],
)
@ -546,6 +549,7 @@ executable(
log_dep,
pcm_dep,
config_dep,
cmdline_dep,
],
)
@ -607,6 +611,7 @@ executable(
output_glue_dep,
encoder_glue_dep,
event_dep,
cmdline_dep,
],
)

View File

@ -31,8 +31,8 @@
#include "fs/NarrowPath.hxx"
#include "io/FileDescriptor.hxx"
#include "util/StaticFifoBuffer.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/PrintException.hxx"
#include "Log.hxx"
#include "LogBackend.hxx"

View File

@ -28,8 +28,8 @@
#include "fs/Path.hxx"
#include "fs/NarrowPath.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/PrintException.hxx"
#include "Log.hxx"
#include "LogBackend.hxx"

View File

@ -35,8 +35,8 @@
#include "fs/NarrowPath.hxx"
#include "io/BufferedOutputStream.hxx"
#include "io/StdioOutputStream.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/PrintException.hxx"
#ifdef ENABLE_ARCHIVE

View File

@ -26,8 +26,8 @@
#include "fs/NarrowPath.hxx"
#include "pcm/AudioParser.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
#include "cmdline/OptionDef.hxx"
#include "cmdline/OptionParser.hxx"
#include "util/StringBuffer.hxx"
#include "util/RuntimeError.hxx"
#include "util/ScopeExit.hxx"
@ -106,8 +106,6 @@ LoadAudioOutput(const ConfigData &config, EventLoop &event_loop,
if (plugin == nullptr)
throw FormatRuntimeError("No such audio output plugin: %s",
plugin_name);
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
return std::unique_ptr<AudioOutput>(ao_plugin_init(event_loop, *plugin,
*block));