mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Add WEBRTC_REVISION variable, fetch the release branch head by default
This commit is contained in:
parent
83814ef6f3
commit
b668195218
3 changed files with 39 additions and 9 deletions
|
|
@ -3,6 +3,7 @@
|
|||
option(BUILD_TESTS "Build test binaries" OFF)
|
||||
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
||||
option(BUILD_SHARED_LIB "Build WebRTC as a shared library." OFF)
|
||||
set(WEBRTC_REVISION "" CACHE STRING "WebRTC commit hash to checkout")
|
||||
|
||||
if(BUILD_SHARED_LIB)
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
|
|
@ -32,4 +33,4 @@ foreach(p LIB BIN INCLUDE CMAKE)
|
|||
if(NOT IS_ABSOLUTE "${${var}}")
|
||||
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ set(LIBWEBRTC_MAJOR_VERSION 0)
|
|||
set(LIBWEBRTC_MINOR_VERSION 0)
|
||||
set(LIBWEBRTC_PATCH_VERSION 1)
|
||||
set(LIBWEBRTC_BUILD_VERSION -rc.4)
|
||||
set(LIBWEBRTC_WEBRTC_REVISION ae2551232b5249e38298a50f2d9a64d3c862db00)
|
||||
set(LIBWEBRTC_WEBRTC_HEAD refs/branch-heads/57)
|
||||
|
||||
set(LIBWEBRTC_API_VERSION
|
||||
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
||||
set(LIBWEBRTC_VERSION
|
||||
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
||||
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ include(ExternalProject)
|
|||
include(LibWebRTCCommand)
|
||||
include(GClientConfig)
|
||||
|
||||
set(_DOWNLOAD_COMMAND ${GCLIENT_EXECUTABLE} sync --revision
|
||||
${LIBWEBRTC_WEBRTC_REVISION} -D -n)
|
||||
set(_BUILD_COMMAND ${PYTHON_EXECUTABLE} src/tools/clang/scripts/update.py)
|
||||
set(_DOWNLOAD_COMMAND ${GCLIENT_EXECUTABLE} sync --with_branch_heads --nohooks)
|
||||
if (WEBRTC_REVISION)
|
||||
set(_DOWNLOAD_COMMAND --revision ${WEBRTC_REVISION})
|
||||
endif (WEBRTC_REVISION)
|
||||
|
||||
ExternalProject_Add(
|
||||
webrtc-src
|
||||
|
|
@ -14,11 +15,39 @@ ExternalProject_Add(
|
|||
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}
|
||||
|
||||
DOWNLOAD_COMMAND ${PREFIX_EXECUTE} ${_DOWNLOAD_COMMAND}
|
||||
BUILD_COMMAND ${PREFIX_EXECUTE} ${_BUILD_COMMAND}
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
set(_NEXT_DEPENDS webrtc-src)
|
||||
if (NOT WEBRTC_REVISION)
|
||||
libwebrtc_command(
|
||||
NAME webrtc-fetch-refs
|
||||
COMMAND ${GIT_EXECUTABLE} fetch origin ${LIBWEBRTC_WEBRTC_HEAD}
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src"
|
||||
COMMENT "Fetching branch heads"
|
||||
DEPENDS webrtc-src
|
||||
)
|
||||
|
||||
libwebrtc_command(
|
||||
NAME webrtc-checkout-fetch-head
|
||||
COMMAND ${GIT_EXECUTABLE} checkout FETCH_HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src"
|
||||
COMMENT "Checking out fetch head"
|
||||
DEPENDS webrtc-fetch-refs
|
||||
)
|
||||
|
||||
set(_NEXT_DEPENDS webrtc-checkout-fetch-head)
|
||||
endif (NOT WEBRTC_REVISION)
|
||||
|
||||
libwebrtc_command(
|
||||
NAME webrtc-update-clang
|
||||
COMMAND ${PYTHON_EXECUTABLE} src/tools/clang/scripts/update.py
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
COMMENT "Updating clang"
|
||||
DEPENDS ${_NEXT_DEPENDS}
|
||||
)
|
||||
|
||||
set(_NEXT_DEPENDS webrtc-update-clang)
|
||||
if (UNIX AND NOT APPLE)
|
||||
libwebrtc_command(
|
||||
NAME webrtc-install-sysroot
|
||||
|
|
@ -170,4 +199,4 @@ ExternalProject_Add(
|
|||
)
|
||||
|
||||
include(Install)
|
||||
include(Package)
|
||||
include(Package)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue