diff options
| author | atkawa7 <atkawa7@yahoo.com> | 2017-06-02 13:33:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-02 13:33:45 -0700 |
| commit | 4b6c1f291c5e9812926b49bbf97dadee285aa0e2 (patch) | |
| tree | 3370802f18c22b4f1afad9f2a73839415ce6c9db /scripts/cmake | |
| parent | 3ebcdd384b58ff5d5f92996a6eb2e9fed0be1710 (diff) | |
| download | vcpkg-4b6c1f291c5e9812926b49bbf97dadee285aa0e2.tar.gz vcpkg-4b6c1f291c5e9812926b49bbf97dadee285aa0e2.zip | |
Acquire chromium depot tools
Diffstat (limited to 'scripts/cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_acquire_depot_tools.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
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() |
