diff --git a/CMakeLists.txt b/CMakeLists.txt index e72611a2..6ea7436c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project (webrtc-streamer) set (WEBRTCROOT "${CMAKE_CURRENT_SOURCE_DIR}/../webrtc" CACHE STRING "WEBRTC root directory") set (WEBRTCDESKTOPCAPTURE "ON" CACHE STRING "WEBRTC Desktop capture") set (WEBRTCCHROMEBRANDED "ON" CACHE STRING "WEBRTC Chrome branded") -set (WEBRTCVERSION "b00c469cad3f8c926fcf81ded90b90b6e1e62b9c" CACHE STRING "WEBRTC version") +set (WEBRTCVERSION "549c9b717fcbdfdf5d76068b3dd37076a9ffeacb" CACHE STRING "WEBRTC version") if(NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE "Release") @@ -82,7 +82,7 @@ if (NOT EXISTS ${WEBRTCOBJS}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_ endif() - set (WEBRTCARGS rtc_include_tests=false\nrtc_enable_protobuf=false\nrtc_build_examples=false\nrtc_build_tools=false\ntreat_warnings_as_errors=false\nenable_js_protobuf=false\nuse_glib=false\nuse_lld=false\n) + set (WEBRTCARGS rtc_include_tests=false\nrtc_enable_protobuf=false\nrtc_build_examples=false\nrtc_build_tools=false\ntreat_warnings_as_errors=false\nenable_js_protobuf=false\nuse_glib=false\n) set (WEBRTCARGS use_custom_libcxx=false\nlibyuv_use_sme=false\n${WEBRTCARGS}) # debug/release if(CMAKE_BUILD_TYPE STREQUAL "Release") @@ -115,13 +115,17 @@ if (NOT EXISTS ${WEBRTCOBJS}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_ endif() #patch - file(READ ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h filecontent) - string(REPLACE "#include " "#include \n#include " filecontent "${filecontent}") - file(WRITE ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h "${filecontent}") +# file(READ ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h filecontent) +# string(REPLACE "#include " "#include \n#include " filecontent "${filecontent}") +# file(WRITE ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h "${filecontent}") - file(READ ${WEBRTCROOT}/src/media/base/media_channel.h filecontent) - string(REGEX REPLACE "ost << ToStringIfSet[^;]*;" "" filecontent "${filecontent}") - file(WRITE ${WEBRTCROOT}/src/media/base/media_channel.h "${filecontent}") + file(READ ${WEBRTCROOT}/src/third_party/perfetto/include/perfetto/tracing/track.h filecontent) + string(REPLACE "#include " "#include \n#include " filecontent "${filecontent}") + file(WRITE ${WEBRTCROOT}/src/third_party/perfetto/include/perfetto/tracing/track.h "${filecontent}") + +# file(READ ${WEBRTCROOT}/src/media/base/media_channel.h filecontent) +# string(REGEX REPLACE "ost << ToStringIfSet[^;]*;" "" filecontent "${filecontent}") +# file(WRITE ${WEBRTCROOT}/src/media/base/media_channel.h "${filecontent}") # sound support @@ -276,6 +280,9 @@ elseif (APPLE) target_link_libraries (${CMAKE_PROJECT_NAME} ${CORE_FOUNDATION} ${APPLICATION_SERVICES} ${CORE_SERVICES} ${CORE_AUDIO} ${AUDIO_TOOLBOX} ${IO_SURFACE} ${APP_KIT}) else() + # use lld to link + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld -B${WEBRTCROOT}/src/third_party/llvm-build/Release+Asserts/bin") + # libv4l2cpp add_definitions(-DHAVE_V4L2) aux_source_directory(libv4l2cpp/src LIBSRC_FILES)