From 848f6a7a64a2dd1fd2f23c26e32d30f895616138 Mon Sep 17 00:00:00 2001 From: Serein <2075337935@qq.com> Date: Thu, 26 Sep 2024 14:56:34 +0800 Subject: [PATCH] fix: build error --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2b021bc..ad7787e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,7 +134,7 @@ jobs: } cmake --preset native @additionalConfigureArgs - cmake --build --preset native-release -DVCPKG_USE_HOST_TOOLS=1 + cmake --build --preset native-release - name: Archive files shell: pwsh diff --git a/CMakeLists.txt b/CMakeLists.txt index c6182b60..4dc37b6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) # MSVC Runtime Library Selection if (VCPKG_TARGET_TRIPLET MATCHES "-windows-static$") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + set(VCPKG_USE_HOST_TOOLS ON) endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake/)