-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
559 additions
and
328 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
if (HAS_OWN_DEPOT_TOOLS) | ||
return() | ||
endif (HAS_OWN_DEPOT_TOOLS) | ||
|
||
include(LibWebRTCExecute) | ||
|
||
if (WEBRTC_REVISION) | ||
libwebrtc_execute( | ||
COMMAND ${GIT_EXECUTABLE} log -1 --format=%ci ${WEBRTC_REVISION} | ||
OUTPUT_VARIABLE _WEBRTC_COMMIT_DATE | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
STAMPFILE webrtc-revision-commit-date | ||
STATUS "Retrieving date for commit ${WEBRTC_REVISION}" | ||
ERROR "Unable to find webrtc commit date at ${WEBRTC_REVISION}" | ||
) | ||
elseif (WEBRTC_BRANCH_HEAD) | ||
libwebrtc_execute( | ||
COMMAND ${GIT_EXECUTABLE} log -1 --format=%ci | ||
OUTPUT_VARIABLE _WEBRTC_COMMIT_DATE | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
STAMPFILE webrtc-branch-head-commit-date | ||
STATUS "Retrieving date for ${WEBRTC_BRANCH_HEAD}" | ||
ERROR "Unable to retrieve the commit date for ${WEBRTC_BRANCH_HEAD}" | ||
) | ||
else (WEBRTC_REVISION) | ||
message(FATAL_ERROR "-- Both WEBRTC_REVISION and WEBRTC_BRANCH_HEAD variables are undefined") | ||
endif (WEBRTC_REVISION) | ||
|
||
string(STRIP ${_WEBRTC_COMMIT_DATE} _WEBRTC_COMMIT_DATE) | ||
libwebrtc_execute( | ||
COMMAND ${GIT_EXECUTABLE} rev-list -n 1 --before=\"${_WEBRTC_COMMIT_DATE}\" master | ||
OUTPUT_VARIABLE _DEPOT_TOOLS_COMMIT | ||
WORKING_DIRECTORY ${DEPOT_TOOLS_PATH} | ||
STAMPFILE webrtc-depot-tools-date | ||
STATUS "Retrieving depot_tools commit before ${_WEBRTC_COMMIT_DATE}" | ||
ERROR "Unable to find depot_tools commit before ${_WEBRTC_COMMIT_DATE}" | ||
) | ||
|
||
string(STRIP ${_DEPOT_TOOLS_COMMIT} _DEPOT_TOOLS_COMMIT) | ||
libwebrtc_execute( | ||
COMMAND ${GIT_EXECUTABLE} checkout ${_DEPOT_TOOLS_COMMIT} | ||
OUTPUT_VARIABLE _DEPOT_TOOLS_CHECKED_OUT | ||
WORKING_DIRECTORY ${DEPOT_TOOLS_PATH} | ||
STAMPFILE webrtc-depot-tools-checkout | ||
STATUS "Checking out depot_tools to commit ${_DEPOT_TOOLS_COMMIT}" | ||
ERROR "Unable to checkout depot_tools to commit ${_DEPOT_TOOLS_COMMIT}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if (ENVIRONMENT_INCLUDED) | ||
return() | ||
endif (ENVIRONMENT_INCLUDED) | ||
set(ENVIRONMENT_INCLUDED true) | ||
|
||
if (WIN32) | ||
get_filename_component(DEPOT_TOOLS_PYTHON_PATH | ||
"${_WEBRTC_PATH}/python276_bin" | ||
REALPATH) | ||
list(APPEND _WEBRTC_PATH "${DEPOT_TOOLS_PYTHON_PATH}") | ||
endif (WIN32) | ||
|
||
list(APPEND _WEBRTC_PATH ${DEPOT_TOOLS_PATH} $ENV{PATH}) | ||
|
||
get_filename_component(_CHROMIUM_PYTHONPATH | ||
"${CMAKE_SOURCE_DIR}/build" | ||
REALPATH) | ||
|
||
if (WIN32) | ||
string(REGEX REPLACE "/" "\\\\" _WEBRTC_PATH "${_WEBRTC_PATH}") | ||
string(REGEX REPLACE "/" "\\\\" _CHROMIUM_PYTHONPATH "${_CHROMIUM_PYTHONPATH}") | ||
string(REGEX REPLACE ";" "\\\\\\\;" _WEBRTC_PATH "${_WEBRTC_PATH}") | ||
else (WIN32) | ||
string(REGEX REPLACE ";" ":" _WEBRTC_PATH "${_WEBRTC_PATH}") | ||
endif (WIN32) | ||
|
||
set(_ENV | ||
PATH="${_WEBRTC_PATH}" | ||
PYTHONPATH="${_CHROMIUM_PYTHONPATH}" | ||
DEPOT_TOOLS_WIN_TOOLCHAIN=0 | ||
DEPOT_TOOLS_UPDATE=0 | ||
CHROME_HEADLESS=1) | ||
|
||
set(PREFIX_EXECUTE ${CMAKE_COMMAND} -E env "${_ENV}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
find_program(GCLIENT_EXECUTABLE | ||
NAMES gclient gclient.bat | ||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/depot_tools) | ||
DOC "Path to gclient executable" | ||
HINTS ${DEPOT_TOOLS_PATH} ENV DEPOT_TOOLS_PATH) | ||
|
||
find_path(DEPOTTOOLS_PATH | ||
find_path(DEPOT_TOOLS_PATH | ||
NAMES gclient gclient.py gclient.bat | ||
gn gn.py gn.bat | ||
ninja ninja.exe ninja-linux32 ninja-linux64 ninja-mac | ||
download_from_google_storage download_from_google_storage.bat | ||
download_from_google_storage.py | ||
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/depot_tools) | ||
DOC "Path to depot_tools directory" | ||
HINTS ${DEPOT_TOOLS_PATH} ENV DEPOT_TOOLS_PATH) | ||
|
||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) | ||
find_package_handle_standard_args(DepotTools | ||
REQUIRED_VARS GCLIENT_EXECUTABLE | ||
FAIL_MESSAGE "Could not find the gclient executable.") | ||
REQUIRED_VARS GCLIENT_EXECUTABLE DEPOT_TOOLS_PATH | ||
FAIL_MESSAGE "Could not find depot_tools.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
file(WRITE ${WEBRTC_PARENT_DIR}/.gclient "solutions = [ | ||
{ | ||
\"url\": \"https://chromium.googlesource.com/external/webrtc.git\", | ||
\"managed\": False, | ||
\"name\": \"src\", | ||
\"deps_file\": \"DEPS\", | ||
\"custom_deps\": {}, | ||
}, | ||
] | ||
") | ||
|
||
if (TARGET_OS STREQUAL "android") | ||
file(APPEND ${WEBRTC_PARENT_DIR}/.gclient "target_os = [\"android\", \"unix\"]") | ||
elseif (TARGET_OS STREQUAL "ios") | ||
file(APPEND ${WEBRTC_PARENT_DIR}/.gclient "target_os = [\"ios\", \"mac\"]") | ||
elseif (TARGET_OS STREQUAL "linux") | ||
file(APPEND ${WEBRTC_PARENT_DIR}/.gclient "target_os = [\"unix\"]") | ||
elseif (TARGET_OS STREQUAL "mac") | ||
file(APPEND ${WEBRTC_PARENT_DIR}/.gclient "target_os = [\"mac\"]") | ||
elseif (TARGET_OS STREQUAL "win") | ||
file(APPEND ${WEBRTC_PARENT_DIR}/.gclient "target_os = [\"win\"]") | ||
endif (TARGET_OS STREQUAL "android") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
set(_GEN_ARGS use_gold=false target_cpu=\\"${TARGET_CPU}\\" target_os=\\"${TARGET_OS}\\") | ||
|
||
if (MSVC OR XCODE) | ||
set(_GEN_ARGS ${_GEN_ARGS} is_debug=$<$<CONFIG:Debug>:true>$<$<CONFIG:Release>:false>$<$<CONFIG:RelWithDebInfo>:false>$<$<CONFIG:MinSizeRel>:false>) | ||
set(_NINJA_BUILD_DIR out/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:Release>$<$<CONFIG:MinSizeRel>:Release>) | ||
elseif (CMAKE_BUILD_TYPE MATCHES Debug) | ||
set(_GEN_ARGS ${_GEN_ARGS} is_debug=true) | ||
set(_NINJA_BUILD_DIR out/Debug) | ||
else (MSVC OR XCODE) | ||
set(_GEN_ARGS ${_GEN_ARGS} is_debug=false) | ||
set(_NINJA_BUILD_DIR out/Release) | ||
endif (MSVC OR XCODE) | ||
|
||
if (BUILD_TESTS) | ||
set(_GEN_ARGS ${_GEN_ARGS} rtc_include_tests=true) | ||
else (BUILD_TESTS) | ||
set(_GEN_ARGS ${_GEN_ARGS} rtc_include_tests=false) | ||
endif (BUILD_TESTS) | ||
|
||
if (GN_EXTRA_ARGS) | ||
set(_GEN_ARGS ${_GEN_ARGS} ${GN_EXTRA_ARGS}) | ||
endif (GN_EXTRA_ARGS) | ||
|
||
if (WIN32) | ||
set(_GN_EXECUTABLE gn.bat) | ||
else (WIN32) | ||
set(_GN_EXECUTABLE gn) | ||
endif (WIN32) | ||
|
||
set(_GEN_COMMAND ${_GN_EXECUTABLE} gen ${_NINJA_BUILD_DIR} --args=\"${_GEN_ARGS}\") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.