From ea0b0de53b6e6fdc3f1b27abf9dcd231e44f6bee Mon Sep 17 00:00:00 2001 From: Axel Isouard Date: Sun, 5 Feb 2017 06:34:33 -0800 Subject: [PATCH] Add GClientConfig cmake module --- CMakeModules/GClientConfig.cmake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CMakeModules/GClientConfig.cmake diff --git a/CMakeModules/GClientConfig.cmake b/CMakeModules/GClientConfig.cmake new file mode 100644 index 0000000..818abac --- /dev/null +++ b/CMakeModules/GClientConfig.cmake @@ -0,0 +1,25 @@ +# +# Retrieve WebRTC source code +# +file(WRITE ${CMAKE_BINARY_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 ${CMAKE_BINARY_DIR}/.gclient "target_os = [\"android\", \"unix\"]") +elseif (TARGET_OS STREQUAL "ios") + file(APPEND ${CMAKE_BINARY_DIR}/.gclient "target_os = [\"ios\", \"mac\"]") +elseif (TARGET_OS STREQUAL "linux") + file(APPEND ${CMAKE_BINARY_DIR}/.gclient "target_os = [\"unix\"]") +elseif (TARGET_OS STREQUAL "mac") + file(APPEND ${CMAKE_BINARY_DIR}/.gclient "target_os = [\"mac\"]") +elseif (TARGET_OS STREQUAL "win") + file(APPEND ${CMAKE_BINARY_DIR}/.gclient "target_os = [\"win\"]") +endif (TARGET_OS STREQUAL "android") \ No newline at end of file