Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Add swig acquire #12697

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions scripts/cmake/vcpkg_find_acquire_program.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
## - NUGET
## - SCONS
## - YASM
## - SWIG
##
## Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md).
##
Expand Down Expand Up @@ -345,6 +346,30 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip")
set(ARCHIVE "aria2-1.34.0-win-32bit-build1.zip")
set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27)
elseif(VAR MATCHES "SWIG")
set(VERSION 4.0.2)
set(PROGNAME swig)
if(CMAKE_HOST_WIN32)
set(URL "https://sourceforge.net/projects/swig/files/swigwin/swigwin-${VERSION}/swigwin-${VERSION}.zip/download")
set(ARCHIVE "swigwin-${VERSION}.zip")
set(HASH b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d)
set(SUBDIR "swigwin-${VERSION}")
set(PATHS "${DOWNLOADS}/tools/swig/${SUBDIR}/${SUBDIR}")
else()
set(_vfa_SUPPORTED TRUE)
set(URL https://sourceforge.net/projects/swig/files/swig/swig-${VERSION}/swig-${VERSION}.tar.gz/download)
set(ARCHIVE "swig-${VERSION}.tar.gz")
set(HASH 05e7da70ce6d9a733b96c0bcfa3c1b82765bd859f48c74759bbf4bb1467acb1809caa310cba5e2b3280cd704fca249eaa0624821dffae1d2a75097c7f55d14ed)
set(SUBDIR "swig-${VERSION}")
set(PATHS "${DOWNLOADS}/tools/swig/${SUBDIR}")
endif()
set(SOURCEFORGE_ARGS
REPO swig
FILENAME "${ARCHIVE}"
SHA512 "${HASH}"
NO_REMOVE_ONE_LEVEL
WORKING_DIRECTORY "${DOWNLOADS}/tools/swig"
)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()
Expand Down