Skip to content

Commit

Permalink
switch to static linking on Windows
Browse files Browse the repository at this point in the history
to workaround Cargo not settin rpath
#224
  • Loading branch information
Be-ing committed Oct 13, 2022
1 parent 92c3e13 commit 11caf3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ if(VCPKG)
set(VCPKG_FEATURE_FLAGS "-compilertracking")
set(VCPKG_INSTALL_OPTIONS "--x-abi-tools-use-exact-versions")

# vcpkg defaults to dynamic linking on Windows, which gets messy because
# Cargo does not set rpaths https://github.com/rust-lang/cargo/issues/5077
if(WIN32)
set(VCPKG_TARGET_TRIPLET "x64-windows-static")
endif()

if(NOT DEFINED ENV{VCPKG_BINARY_SOURCES})
if(WIN32)
set(COMMAND_PREIFX "")
Expand Down

0 comments on commit 11caf3f

Please sign in to comment.