mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 19:25:12 +00:00
Compare commits
6 commits
master
...
v1.0.1-nod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f91533ae03 | ||
|
|
6a1ea46065 | ||
|
|
6abc1de10a | ||
|
|
b2ed90417a | ||
|
|
8f818d2d0d | ||
|
|
7ecb22ead6 |
4 changed files with 29 additions and 27 deletions
|
|
@ -20,7 +20,6 @@ find_package(DepotTools REQUIRED)
|
||||||
# Options
|
# Options
|
||||||
#
|
#
|
||||||
|
|
||||||
option(BUILD_TESTS "Build test binaries" OFF)
|
|
||||||
option(BUILD_SAMPLES "Build samples binaries" OFF)
|
option(BUILD_SAMPLES "Build samples binaries" OFF)
|
||||||
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
# Versioning
|
# Versioning
|
||||||
#
|
#
|
||||||
|
|
||||||
set(LIBWEBRTC_MAJOR_VERSION 0)
|
set(LIBWEBRTC_MAJOR_VERSION 1)
|
||||||
set(LIBWEBRTC_MINOR_VERSION 0)
|
set(LIBWEBRTC_MINOR_VERSION 0)
|
||||||
set(LIBWEBRTC_PATCH_VERSION 1)
|
set(LIBWEBRTC_PATCH_VERSION 1)
|
||||||
set(LIBWEBRTC_BUILD_VERSION rc.4)
|
set(LIBWEBRTC_BUILD_VERSION nodewrtc)
|
||||||
|
|
||||||
set(LIBWEBRTC_API_VERSION
|
set(LIBWEBRTC_API_VERSION
|
||||||
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ endif (TARGET_OS STREQUAL "android")
|
||||||
#
|
#
|
||||||
# Generate build files
|
# Generate build files
|
||||||
#
|
#
|
||||||
set(_GEN_ARGS use_gold=false target_cpu=\\"${TARGET_CPU}\\" target_os=\\"${TARGET_OS}\\")
|
set(_GEN_ARGS use_gold=false rtc_include_tests=true target_cpu=\\"${TARGET_CPU}\\" target_os=\\"${TARGET_OS}\\")
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
if (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
set(_GEN_ARGS ${_GEN_ARGS} is_debug=false)
|
set(_GEN_ARGS ${_GEN_ARGS} is_debug=false)
|
||||||
|
|
@ -112,10 +112,6 @@ elseif (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
set(_GEN_ARGS ${_GEN_ARGS} is_debug=true)
|
set(_GEN_ARGS ${_GEN_ARGS} is_debug=true)
|
||||||
endif (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
endif (NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
|
|
||||||
if (NOT BUILD_TESTS)
|
|
||||||
set(_GEN_ARGS ${_GEN_ARGS} rtc_include_tests=false)
|
|
||||||
endif (NOT BUILD_TESTS)
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(_GEN_ARGS ${_GEN_ARGS})
|
set(_GEN_ARGS ${_GEN_ARGS})
|
||||||
set(_GEN_COMMAND gn gen out/Default --args="${_GEN_ARGS}")
|
set(_GEN_COMMAND gn gen out/Default --args="${_GEN_ARGS}")
|
||||||
|
|
|
||||||
|
|
@ -18,23 +18,32 @@ endif ()
|
||||||
file(GLOB_RECURSE LIBWEBRTC_OBJ_FILES
|
file(GLOB_RECURSE LIBWEBRTC_OBJ_FILES
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/*.${LIBWEBRTC_OBJ_EXT})
|
${LIBWEBRTC_OUTPUT_DIR}/obj/*.${LIBWEBRTC_OBJ_EXT})
|
||||||
|
|
||||||
file(GLOB_RECURSE LIBWEBRTC_OBJ_EXCLUDED
|
# capture the assembly compile outputs of libvpx_yasm.lib and other third_party libs
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/third_party/yasm/gen*/*.${LIBWEBRTC_OBJ_EXT}
|
if (WIN32)
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/third_party/yasm/re2c/*.${LIBWEBRTC_OBJ_EXT}
|
file(GLOB_RECURSE LIBWEBRTC_O_FILES
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/third_party/yasm/yasm/*.${LIBWEBRTC_OBJ_EXT}
|
${LIBWEBRTC_OUTPUT_DIR}/obj/*.o)
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/third_party/protobuf/protoc/*.${LIBWEBRTC_OBJ_EXT}
|
list(APPEND LIBWEBRTC_OBJ_FILES ${LIBWEBRTC_O_FILES})
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/third_party/protobuf/protobuf_full/*.${LIBWEBRTC_OBJ_EXT}
|
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/webrtc/examples/*.${LIBWEBRTC_OBJ_EXT}
|
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/webrtc/tools/*.${LIBWEBRTC_OBJ_EXT}
|
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/webrtc/modules/video_capture/video_capture/video_capture_external.${LIBWEBRTC_OBJ_EXT}
|
|
||||||
${LIBWEBRTC_OUTPUT_DIR}/obj/webrtc/modules/video_capture/video_capture/device_info_external.${LIBWEBRTC_OBJ_EXT})
|
|
||||||
|
|
||||||
list(LENGTH LIBWEBRTC_OBJ_EXCLUDED LIBWEBRTC_OBJ_EXCLUDED_LEN)
|
|
||||||
|
|
||||||
if (${LIBWEBRTC_OBJ_EXCLUDED_LEN} GREATER "0")
|
|
||||||
list(REMOVE_ITEM LIBWEBRTC_OBJ_FILES ${LIBWEBRTC_OBJ_EXCLUDED})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX test)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX unittests)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX third_party/yasm/gen)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX third_party/yasm/re2c)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX third_party/yasm/re2c)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX third_party/protobuf/protoc)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX third_party/protobuf/protobuf_full)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX webrtc/examples)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX webrtc/tools)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX webrtc/modules/video_capture/video_capture/video_capture_external)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX webrtc/modules/video_capture/video_capture/device_info_external)
|
||||||
|
list(FILTER LIBWEBRTC_OBJ_FILES EXCLUDE REGEX webrtc/modules/video_capture/video_capture/device_info_external)
|
||||||
|
|
||||||
|
#add fakeaudio device
|
||||||
|
file(GLOB_RECURSE LIBWEBRTC_TEST_COMMON_FILES
|
||||||
|
"${LIBWEBRTC_OUTPUT_DIR}/obj/webrtc/test/test_common/*.${LIBWEBRTC_OBJ_EXT}"
|
||||||
|
"${LIBWEBRTC_OUTPUT_DIR}/obj/testing/gtest/gtest*.${LIBWEBRTC_OBJ_EXT}")
|
||||||
|
list(APPEND LIBWEBRTC_OBJ_FILES ${LIBWEBRTC_TEST_COMMON_FILES})
|
||||||
|
|
||||||
add_library(webrtc STATIC ${LIBWEBRTC_OBJ_FILES})
|
add_library(webrtc STATIC ${LIBWEBRTC_OBJ_FILES})
|
||||||
|
|
||||||
set_source_files_properties(${LIBWEBRTC_OBJ_FILES} PROPERTIES
|
set_source_files_properties(${LIBWEBRTC_OBJ_FILES} PROPERTIES
|
||||||
|
|
@ -43,18 +52,16 @@ set_source_files_properties(${LIBWEBRTC_OBJ_FILES} PROPERTIES
|
||||||
|
|
||||||
set_target_properties(webrtc PROPERTIES
|
set_target_properties(webrtc PROPERTIES
|
||||||
LINKER_LANGUAGE C
|
LINKER_LANGUAGE C
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${LIBWEBRTC_OUTPUT_DIR})
|
LIBRARY_OUTPUT_DIRECTORY ${LIBWEBRTC_OUTPUT_DIR}
|
||||||
|
PREFIX lib)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install headers
|
# Install headers
|
||||||
#
|
#
|
||||||
install(DIRECTORY ${LIBWEBRTC_INCLUDE_DIR}
|
install(DIRECTORY ${LIBWEBRTC_INCLUDE_DIR}
|
||||||
DESTINATION "include/libwebrtc"
|
DESTINATION "include"
|
||||||
FILES_MATCHING PATTERN "*.h")
|
FILES_MATCHING PATTERN "*.h")
|
||||||
|
|
||||||
install(FILES ${CMAKE_INSTALL_PREFIX}/libwebrtc.h
|
|
||||||
DESTINATION "include/libwebrtc")
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install library
|
# Install library
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue