Fix unfound Microsoft runtimes while installing by removing the set on MSVC_VERSION that should be already set.

This commit is contained in:
Julien Wadel 2025-12-09 11:51:13 +01:00
parent 876fdbe619
commit 31726b46cd

View file

@ -117,12 +117,11 @@ elseif(WIN32)
NAMES msys2_shell.cmd NAMES msys2_shell.cmd
HINTS "C:/msys64/" HINTS "C:/msys64/"
) )
set(MSVC_VERSION ${MSVC_TOOLSET_VERSION})
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
endif() endif()
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
find_file(UCRTBASE_LIB "ucrtbase.dll" PATHS "C:/Windows/System32") find_file(UCRTBASE_LIB "ucrtbase.dll" PATHS "C:/Windows/System32")
install(FILES ${UCRTBASE_LIB} DESTINATION "${CMAKE_INSTALL_BINDIR}") install(FILES ${UCRTBASE_LIB} DESTINATION "${CMAKE_INSTALL_BINDIR}")