From 0a720418c4aa56d0ce3cae651cfa901960799e53 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:23:18 +0100 Subject: [PATCH] Only set GENERATOR_INSTANCE if supprted by generator --- triplets/x64-win-msvc/x64-win-msvc-toolchain.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/triplets/x64-win-msvc/x64-win-msvc-toolchain.cmake b/triplets/x64-win-msvc/x64-win-msvc-toolchain.cmake index abcc59a05c..06b5e762e3 100644 --- a/triplets/x64-win-msvc/x64-win-msvc-toolchain.cmake +++ b/triplets/x64-win-msvc/x64-win-msvc-toolchain.cmake @@ -28,7 +28,9 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN) endblock() endif() - set(CMAKE_GENERATOR_INSTANCE "$ENV{VSINSTALLDIR}") + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(CMAKE_GENERATOR_INSTANCE "$ENV{VSINSTALLDIR}") + endif() set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>$<$:DLL>" CACHE STRING "") set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "")