mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
update to popl v1.2.0, add groff message
This commit is contained in:
parent
64c820e159
commit
ede7603cbf
4 changed files with 24 additions and 5 deletions
|
@ -29,7 +29,10 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|||
endif()
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
||||
set (ANDROID TRUE)
|
||||
message(FATAL_ERROR "Android not yet supported")
|
||||
add_definitions("-DASIO_DISABLE_STD_FUTURE")
|
||||
if (BUILD_SERVER)
|
||||
message(FATAL_ERROR "Snapserver not yet supported for Android, use \"-DBUILD_SERVER=OFF\"")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Configure paths
|
||||
|
@ -94,7 +97,7 @@ include(CheckIncludeFileCXX)
|
|||
|
||||
cmake_push_check_state()
|
||||
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_SOURCE_DIR}/externals/asio/asio/include")
|
||||
check_include_file_cxx(asio.hpp HAS_ASIO_HPP "-pthread -DASIO_STANDALONE -std=c++11")
|
||||
check_include_file_cxx(asio.hpp HAS_ASIO_HPP "-pthread -DASIO_STANDALONE -DASIO_DISABLE_STD_FUTURE -std=c++11")
|
||||
cmake_pop_check_state()
|
||||
if(HAS_ASIO_HPP)
|
||||
add_definitions("-DHAS_ASIO_HPP -DASIO_STANDALONE")
|
||||
|
|
|
@ -83,7 +83,8 @@ int main (int argc, char **argv)
|
|||
|
||||
OptionParser op("Allowed options");
|
||||
auto helpSwitch = op.add<Switch>("", "help", "produce help message");
|
||||
auto debugOption = op.add<Implicit<string>, Visibility::hidden>("", "debug", "enable debug logging", "");
|
||||
auto groffSwitch = op.add<Switch, Attribute::hidden>("", "groff", "produce groff message");
|
||||
auto debugOption = op.add<Implicit<string>, Attribute::hidden>("", "debug", "enable debug logging", "");
|
||||
auto versionSwitch = op.add<Switch>("v", "version", "show version number");
|
||||
#if defined(HAS_ALSA)
|
||||
auto listSwitch = op.add<Switch>("l", "list", "list pcm devices");
|
||||
|
@ -143,6 +144,13 @@ int main (int argc, char **argv)
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (groffSwitch->is_set())
|
||||
{
|
||||
GroffOptionPrinter option_printer(&op);
|
||||
cout << option_printer.print();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (instance <= 0)
|
||||
std::invalid_argument("instance id must be >= 1");
|
||||
|
||||
|
|
2
externals/popl
vendored
2
externals/popl
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 2460ecc4567fad97dacfc5b389a75000adb0765d
|
||||
Subproject commit a8a153066c7891e7a7abb2ef5ea24d7935c433f3
|
|
@ -60,7 +60,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
OptionParser op("Allowed options");
|
||||
auto helpSwitch = op.add<Switch>("h", "help", "Produce help message");
|
||||
auto debugOption = op.add<Implicit<string>, Visibility::hidden>("", "debug", "enable debug logging", "");
|
||||
auto groffSwitch = op.add<Switch, Attribute::hidden>("", "groff", "produce groff message");
|
||||
auto debugOption = op.add<Implicit<string>, Attribute::hidden>("", "debug", "enable debug logging", "");
|
||||
auto versionSwitch = op.add<Switch>("v", "version", "Show version number");
|
||||
/*auto portValue =*/ op.add<Value<size_t>>("p", "port", "Server port", settings.port, &settings.port);
|
||||
/*auto controlPortValue =*/ op.add<Value<size_t>>("", "controlPort", "Remote control port", settings.controlPort, &settings.controlPort);
|
||||
|
@ -105,6 +106,13 @@ int main(int argc, char* argv[])
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (groffSwitch->is_set())
|
||||
{
|
||||
GroffOptionPrinter option_printer(&op);
|
||||
cout << option_printer.print();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (!streamValue->is_set())
|
||||
settings.pcmStreams.push_back(streamValue->value());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue