Skip to content

Commit

Permalink
No env
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Sep 23, 2024
1 parent a43482a commit 46bff3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ jobs:
run: |
vcpkg install mpir:x64-windows-static
vcpkg integrate install
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV
echo $VCPKG_ROOT
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
Expand Down
9 changes: 2 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@ if(WIN32 AND NOT(LINK_MPIR_STATICALLY))

list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../mpir_gc_x64")
elseif(WIN32)
if(DEFINED ENV{VCPKG_ROOT})
# Set the toolchain file using the environment variable
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
message(STATUS "Using vcpkg toolchain file from $ENV{VCPKG_ROOT}")
else()
message(FATAL_ERROR "VCPKG_ROOT environment variable is not defined.")
endif()
set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
message(STATUS "Using vcpkg toolchain file")

set(VCPKG_TARGET_TRIPLET "x64-windows-static")

Expand Down

0 comments on commit 46bff3b

Please sign in to comment.