-
Notifications
You must be signed in to change notification settings - Fork 0
/
s5cmdUrls.cmake
72 lines (54 loc) · 2.64 KB
/
s5cmdUrls.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Checksum copied from "s5cmd_checksums.txt" associated with the s5cmd GitHub release
set(version "2.2.2")
set(linux32_filename "s5cmd_${version}_Linux-32bit.tar.gz")
set(linux32_sha256 "dc9ebe570fb5abcf5781511901d93425879022d56e73ab44dd32c45b2bfbc04b")
set(linux64_filename "s5cmd_${version}_Linux-64bit.tar.gz")
set(linux64_sha256 "a15f83d2a6dc091e43b2a120f29f8f6c86d146c381766c0197ec75d7985af2b6")
set(linuxarm64_filename "s5cmd_${version}_Linux-arm64.tar.gz")
set(linuxarm64_sha256 "eabf18082398c332d33c692d383a889be204b1e7716f820e014bf11474ad345b")
set(linuxppc64le_filename "s5cmd_${version}_Linux-ppc64le.tar.gz")
set(linuxppc64le_sha256 "90e5f0b774745a93795a04add18f63b5f96e61bcd5d36d7dc26cfec38412cd23")
set(macos64_filename "s5cmd_${version}_macOS-64bit.tar.gz")
set(macos64_sha256 "5503a3308e239f081e5238e0af57958ae618e0de8b9c71142fe80f38be77e1c7")
set(macosarm64_filename "s5cmd_${version}_macOS-arm64.tar.gz")
set(macosarm64_sha256 "fa3ae7e093fd6ac8a5236a000d5373779eb403c57ee955fc7da9549668644e38")
set(win32_filename "s5cmd_${version}_Windows-32bit.zip")
set(win32_sha256 "ee667eb01b955a7dda588456bd102982f8344bed393a8b63b5d4c9c325e01349")
set(win64_filename "s5cmd_${version}_Windows-64bit.zip")
set(win64_sha256 "f7c311907c78efa56e27a25fba1f87520754c402bbe1cb4901d3522f12a75497")
set(winarm64_filename "s5cmd_${version}_Windows-arm64.zip")
set(winarm64_sha256 "61e0adf3635334fa62714a5cf221e03f3549392e9613f9a7591a03d8e6fe0d64")
cmake_host_system_information(RESULT is_64bit QUERY IS_64BIT)
set(archive "linux32")
if(is_64bit)
set(archive "linux64")
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set(archive "linuxarm64")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
set(archive "linuxppc64le")
endif()
endif()
if(APPLE)
set(archive "macos64")
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64")
set(archive "macosarm64")
endif()
endif()
if(WIN32)
set(archive "win32")
if(is_64bit)
set(archive "win64")
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64" OR "$ENV{SETUPTOOLS_EXT_SUFFIX}" MATCHES arm64)
set(archive "winarm64")
endif()
endif()
endif()
if(NOT DEFINED "${archive}_filename")
message(FATAL_ERROR "Failed to determine which archive to download: '${archive}_filename' variable is not defined")
endif()
if(NOT DEFINED "${archive}_sha256")
message(FATAL_ERROR "Could you make sure variable '${archive}_sha256' is defined ?")
endif()
set(s5cmd_archive_filename "${${archive}_filename}")
set(s5cmd_archive_sha256 "${${archive}_sha256}")
set(s5cmd_archive_url "https://github.com/peak/s5cmd/releases/download/v${version}/${s5cmd_archive_filename}")