Skip to content

Commit

Permalink
build: set VCPKGRS_TRIPLET from VCPKG_TARGET_TRIPLET
Browse files Browse the repository at this point in the history
  • Loading branch information
kanru committed Sep 18, 2024
1 parent 1c524bb commit d2939a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
choco install ninja
echo VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT >> $env:GITHUB_ENV
echo CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake >> $env:GITHUB_ENV
echo VCPKGRS_TRIPLET=x64-windows-static >> $env:GITHUB_ENV
echo VCPKG_TARGET_TRIPLET=x64-windows-static >> $env:VCPKG_TARGET_TRIPLET
& $env:VCPKG_INSTALLATION_ROOT\vcpkg install --triplet x64-windows-static sqlite3
- if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Build
run: |
cmake --preset ${{ matrix.preset }} -DVCPKG_TARGET_TRIPLET=${{ env.VCPKGRS_TRIPLET }}
cmake --preset ${{ matrix.preset }} -DVCPKG_TARGET_TRIPLET=${{ env.VCPKG_TARGET_TRIPLET }}
cmake --build build
cmake --install build --prefix install
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ if(CMAKE_SYSTEM MATCHES "Windows")
corrosion_add_target_rustflags(chewing_capi -Ctarget-feature=+crt-static)
corrosion_add_target_rustflags(chewing_testhelper -Ctarget-feature=+crt-static)
corrosion_add_target_rustflags(chewing-cli -Ctarget-feature=+crt-static)
if(VCPKG_TARGET_TRIPLET)
corrosion_set_env_vars(chewing-cli VCPKGRS_TRIPLET $VCPKG_TARGET_TRIPLET)
endif()
endif()

# Feature probe
Expand Down

0 comments on commit d2939a0

Please sign in to comment.