diff --git a/.gitignore b/.gitignore index 77afae24..caa27d72 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ server/snapserver GPATH GRTAGS GTAGS +build diff --git a/CMakeLists.txt b/CMakeLists.txt index b89c03a7..3714c859 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,8 @@ set(CMAKE_CXX_STANDARD 11) include(${CMAKE_SOURCE_DIR}/cmake/TargetArch.cmake) target_architecture(ARCH) +#set(THREADS_PTHREAD_ARG "2" CACHE STRING "Forcibly set by CMakeLists.txt." FORCE) + # Check dependencies find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) @@ -52,7 +54,7 @@ include(CheckIncludeFileCXX) cmake_push_check_state() set(CMAKE_REQUIRED_DEFINITIONS "-DASIO_STANDALONE") -check_include_file_cxx(asio.hpp HAS_ASIO_HPP) +check_include_file_cxx(asio.hpp HAS_ASIO_HPP -pthread) cmake_pop_check_state() if(HAS_ASIO_HPP) add_definitions("-DHAS_ASIO_HPP -DASIO_STANDALONE") diff --git a/client/metadata.h b/client/metadata.h index 7643eae6..86361313 100644 --- a/client/metadata.h +++ b/client/metadata.h @@ -27,7 +27,11 @@ //#include //#include //#include -#include "json.hpp" +#ifdef HAS_JSONRPCPP +#include +#else +#include "externals/json.hpp" +#endif // Prefix used in output #define METADATA std::string("metadata") diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index adae90a7..6e9dc37e 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1 +1 @@ -add_library(common STATIC log.cpp sampleFormat.cpp) \ No newline at end of file +add_library(common STATIC daemon.cpp sampleFormat.cpp) \ No newline at end of file diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 089b5600..d4851500 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -43,7 +43,7 @@ if (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND) ${OGG_INCLUDE_DIRS} ${VORBIS_INCLUDE_DIRS} ${VORBISENC_INCLUDE_DIRS}) -endif (OGG_FOUND AND VORBIS_FOUND AND VORBIS_ENC_FOUND) +endif (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND) if (FLAC_FOUND) list(APPEND SERVER_SOURCES encoder/flacEncoder.cpp) diff --git a/server/streamreader/spotifyStream.cpp b/server/streamreader/spotifyStream.cpp index dd30c28a..9f044afb 100644 --- a/server/streamreader/spotifyStream.cpp +++ b/server/streamreader/spotifyStream.cpp @@ -154,8 +154,7 @@ void SpotifyStream::onStderrMsg(const char* buffer, size_t n) { LOG(INFO) << "metadata: <" << m[1] << ">\n"; - json jtag; - setMeta(jtag.parse(m[1])); + setMeta(json::parse(m[1].str())); libreelec_patched = true; } }