From 3164a7236d0f2c586762d1bf4f4a333ca17a59ae Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Tue, 11 Sep 2018 17:36:09 +0300 Subject: [PATCH] - fix linux build of support library - allow AMR codec usage to be configured from CMake --- src/CMakeLists.txt | 4 +++- src/engine/helper/HL_Process.cpp | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6076a5ef..b7b9dc44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,6 +55,8 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) set (rtphone_libs libs) set (rtphone_engine engine) +set (USE_AMR_CODEC OFF CACHE BOOL "Use AMR codec. Requires libraries.") + set (RTPHONE_SOURCES ${rtphone_engine}/media/MT_Statistics.cpp ${rtphone_engine}/media/MT_WebRtc.cpp @@ -115,7 +117,7 @@ endif (USE_AMR_CODEC) target_link_libraries(rtphone ice_stack jrtplib g729_codec gsm_codec gsmhr_codec g722_codec srtp resiprocate helper_lib audio_lib webrtc speexdsp - opus uuid) + opus uuid ${LIBS}) target_include_directories(rtphone diff --git a/src/engine/helper/HL_Process.cpp b/src/engine/helper/HL_Process.cpp index e42be740..ca82d43c 100644 --- a/src/engine/helper/HL_Process.cpp +++ b/src/engine/helper/HL_Process.cpp @@ -75,7 +75,12 @@ std::string OsProcess::execCommand(const std::string& cmd) return output; } + #else + +#include +#include + std::string OsProcess::execCommand(const std::string& cmd) { std::string cp = cmd;