mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-27 21:38:48 +02:00
fix CMake compile errors
This commit is contained in:
parent
39b880e650
commit
fc075555ea
6 changed files with 12 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -34,3 +34,4 @@ server/snapserver
|
||||||
GPATH
|
GPATH
|
||||||
GRTAGS
|
GRTAGS
|
||||||
GTAGS
|
GTAGS
|
||||||
|
build
|
||||||
|
|
|
@ -43,6 +43,8 @@ set(CMAKE_CXX_STANDARD 11)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/TargetArch.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/TargetArch.cmake)
|
||||||
target_architecture(ARCH)
|
target_architecture(ARCH)
|
||||||
|
|
||||||
|
#set(THREADS_PTHREAD_ARG "2" CACHE STRING "Forcibly set by CMakeLists.txt." FORCE)
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
@ -52,7 +54,7 @@ include(CheckIncludeFileCXX)
|
||||||
|
|
||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS "-DASIO_STANDALONE")
|
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()
|
cmake_pop_check_state()
|
||||||
if(HAS_ASIO_HPP)
|
if(HAS_ASIO_HPP)
|
||||||
add_definitions("-DHAS_ASIO_HPP -DASIO_STANDALONE")
|
add_definitions("-DHAS_ASIO_HPP -DASIO_STANDALONE")
|
||||||
|
|
|
@ -27,7 +27,11 @@
|
||||||
//#include <cstring>
|
//#include <cstring>
|
||||||
//#include <iostream>
|
//#include <iostream>
|
||||||
//#include <streambuf>
|
//#include <streambuf>
|
||||||
#include "json.hpp"
|
#ifdef HAS_JSONRPCPP
|
||||||
|
#include <jsonrpcpp/json.hpp>
|
||||||
|
#else
|
||||||
|
#include "externals/json.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Prefix used in output
|
// Prefix used in output
|
||||||
#define METADATA std::string("metadata")
|
#define METADATA std::string("metadata")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
add_library(common STATIC log.cpp sampleFormat.cpp)
|
add_library(common STATIC daemon.cpp sampleFormat.cpp)
|
|
@ -43,7 +43,7 @@ if (OGG_FOUND AND VORBIS_FOUND AND VORBISENC_FOUND)
|
||||||
${OGG_INCLUDE_DIRS}
|
${OGG_INCLUDE_DIRS}
|
||||||
${VORBIS_INCLUDE_DIRS}
|
${VORBIS_INCLUDE_DIRS}
|
||||||
${VORBISENC_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)
|
if (FLAC_FOUND)
|
||||||
list(APPEND SERVER_SOURCES encoder/flacEncoder.cpp)
|
list(APPEND SERVER_SOURCES encoder/flacEncoder.cpp)
|
||||||
|
|
|
@ -154,8 +154,7 @@ void SpotifyStream::onStderrMsg(const char* buffer, size_t n)
|
||||||
{
|
{
|
||||||
LOG(INFO) << "metadata: <" << m[1] << ">\n";
|
LOG(INFO) << "metadata: <" << m[1] << ">\n";
|
||||||
|
|
||||||
json jtag;
|
setMeta(json::parse(m[1].str()));
|
||||||
setMeta(jtag.parse(m[1]));
|
|
||||||
libreelec_patched = true;
|
libreelec_patched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue