From 4b6c1f291c5e9812926b49bbf97dadee285aa0e2 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 2 Jun 2017 13:33:45 -0700 Subject: Acquire chromium depot tools --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/cmake/vcpkg_acquire_depot_tools.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake new file mode 100644 index 000000000..3b206e271 --- /dev/null +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -0,0 +1,20 @@ +function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) + set(TOOLPATH ${DOWNLOADS}/tools/depot_tools) + set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") + set(ARCHIVE "depot_tools.zip") + set(STAMP "initialized-depot-tools.stamp") + + if(NOT EXISTS "${TOOLPATH}/${STAMP}") + message(STATUS "Acquiring Depot Tools...") + file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}) + file(REMOVE_RECURSE ${TOOLPATH}) + file(MAKE_DIRECTORY ${TOOLPATH}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${TOOLPATH} + ) + file(WRITE "${TOOLPATH}/${STAMP}" "0") + message(STATUS "Acquiring Depot Tools... OK") + endif() + set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) +endfunction() -- cgit v1.2.3