11# detect the vcpkg triplet based on the system information
22windows_triplet := " x64-windows-static"
3+ vcpkg_version := " 2025-09-03"
4+ vcpkg_tool_url := if os_family () == " windows" {
5+ " https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + " /vcpkg.exe"
6+ } else if os () == " macos" {
7+ " https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + " /vcpkg-macos"
8+ } else {
9+ " https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + " /vcpkg-muslc"
10+ }
11+
312VCPKG_DEFAULT_TRIPLET := if os_family () == " windows" {
413 windows_triplet
514} else if os () == " macos" {
@@ -16,6 +25,18 @@ VCPKG_DEFAULT_HOST_TRIPLET := VCPKG_DEFAULT_TRIPLET
1625vcpkg_root := env (' VCPKG_ROOT' , join (justfile_directory (), " .." , " vcpkg" ))
1726in_git_repo := path_exists (join (justfile_directory (), " .git" ))
1827
28+ [windows ]
29+ download_vcpkg_bin :
30+ mkdir ' {{ join (justfile_directory (), " vcpkg" )}} '
31+ curl -L --fail --show-error ' {{ vcpkg_tool_url}} ' -o ' {{ join (justfile_directory (), " vcpkg" , " vcpkg.exe" )}} '
32+
33+ [unix ]
34+ download_vcpkg_bin :
35+ rm -r ' {{ join (justfile_directory (), " vcpkg" )}} '
36+ mkdir -p ' {{ join (justfile_directory (), " vcpkg" )}} '
37+ curl -L --fail --show-error ' {{ vcpkg_tool_url}} ' -o ' {{ join (justfile_directory (), " vcpkg" , " vcpkg" )}} '
38+ chmod + x ' {{ join (justfile_directory (), " vcpkg" , " vcpkg" )}} '
39+
1940git_status_clean :
2041 if {{ in_git_repo}} ; then git diff --quiet --exit-code; fi
2142
0 commit comments