fix CMake compile errors

This commit is contained in:
badaix 2018-02-04 13:11:07 +01:00
parent 39b880e650
commit fc075555ea
6 changed files with 12 additions and 6 deletions

1
.gitignore vendored
View file

@ -34,3 +34,4 @@ server/snapserver
GPATH
GRTAGS
GTAGS
build

View file

@ -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")

View file

@ -27,7 +27,11 @@
//#include <cstring>
//#include <iostream>
//#include <streambuf>
#include "json.hpp"
#ifdef HAS_JSONRPCPP
#include <jsonrpcpp/json.hpp>
#else
#include "externals/json.hpp"
#endif
// Prefix used in output
#define METADATA std::string("metadata")

View file

@ -1 +1 @@
add_library(common STATIC log.cpp sampleFormat.cpp)
add_library(common STATIC daemon.cpp sampleFormat.cpp)

View file

@ -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)

View file

@ -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;
}
}