[vcpkg scripts] Revise vcpkg_from_sourceforge (#48211)

This commit is contained in:
Kai Pastor 2025-11-10 19:04:34 +01:00 committed by GitHub
parent b607037824
commit ae29913a4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -28,12 +28,10 @@ function(vcpkg_download_sourceforge out_var)
- an organization name followed by a repository name separated by a single slash")
endif()
if(DEFINED arg_REF)
if(NOT "${arg_REF}" STREQUAL "")
set(url "${sourceforge_host}/${org_name}/files/${repo_name}/${arg_REF}/${arg_FILENAME}")
elseif(DEFINED repo_name)
set(url "${sourceforge_host}/${org_name}/${repo_name}/files/${arg_FILENAME}")
else()
set(url "${sourceforge_host}/${org_name}/files/${arg_FILENAME}")
set(url "${sourceforge_host}/${arg_REPO}/files/${arg_FILENAME}")
endif()
string(SUBSTRING "${arg_SHA512}" 0 10 sanitized_ref)