forked from ShuriZma/suyu
Migrate the downloads to suyu gitlab
This commit is contained in:
parent
b108b5a8aa
commit
c4d58ce508
|
@ -7,17 +7,18 @@
|
|||
# prefix_var: name of a variable which will be set with the path to the extracted contents
|
||||
function(download_bundled_external remote_path lib_name prefix_var)
|
||||
|
||||
set(package_base_url "https://github.com/yuzu-mirror/")
|
||||
set(package_base_url "https://gitlab.com/suyu2/")
|
||||
set(package_repo "no_platform")
|
||||
set(package_extension "no_platform")
|
||||
set(package_head "?ref_type=heads")
|
||||
if (WIN32)
|
||||
set(package_repo "ext-windows-bin/raw/master/")
|
||||
set(package_repo "ext-windows-bin/-/blob/master/")
|
||||
set(package_extension ".7z")
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(package_repo "ext-linux-bin/raw/main/")
|
||||
set(package_repo "ext-linux-bin/-/blob/master/")
|
||||
set(package_extension ".tar.xz")
|
||||
elseif (ANDROID)
|
||||
set(package_repo "ext-android-bin/raw/main/")
|
||||
set(package_repo "ext-android-bin/-/blob/master/")
|
||||
set(package_extension ".tar.xz")
|
||||
else()
|
||||
message(FATAL_ERROR "No package available for this platform")
|
||||
|
@ -28,7 +29,7 @@ set(prefix "${CMAKE_BINARY_DIR}/externals/${lib_name}")
|
|||
if (NOT EXISTS "${prefix}")
|
||||
message(STATUS "Downloading binaries for ${lib_name}...")
|
||||
file(DOWNLOAD
|
||||
${package_url}${remote_path}${lib_name}${package_extension}
|
||||
${package_url}${remote_path}${lib_name}${package_extension}${package_head}
|
||||
"${CMAKE_BINARY_DIR}/externals/${lib_name}${package_extension}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${CMAKE_BINARY_DIR}/externals/${lib_name}${package_extension}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
|
|
Loading…
Reference in New Issue