Only set GENERATOR_INSTANCE if supprted by generator

This commit is contained in:
Alexander Neumann 2024-11-22 08:23:18 +01:00 committed by GitHub
parent b4bc90fdcb
commit 0a720418c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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$<$<CONFIG:Debug>:Debug>$<$<STREQUAL:${VCPKG_CRT_LINKAGE},dynamic>:DLL>" CACHE STRING "")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "")