From 2e35636a9690c5298e082c8a16d4ffe207009341 Mon Sep 17 00:00:00 2001 From: huangqinjin Date: Thu, 8 Apr 2021 04:17:04 +0800 Subject: [PATCH] [vcpkg] Convert env vars slash if host is Win32 (#16927) --- scripts/get_cmake_vars/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index 6be5947873..2b0bd671a5 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -79,7 +79,7 @@ foreach(VAR IN LISTS VCPKG_VARS_TO_CHECK) endforeach() foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) - IF(WIN32) + if(CMAKE_HOST_WIN32) string(REPLACE "\\" "/" ENV_${_env} "$ENV{${_env}}") string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"${ENV_${_env}}\")\n") else()