From 9b2778d412351db9c8c7f667335cbdf51b555124 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 May 2015 11:57:42 -0400 Subject: [PATCH] InstallRequiredSystemLibraries: Update for VS 2015 (#15552) The part of the MS C Runtime library that applications need to distribute has been renamed from "msvcr*.dll" to "vcruntime*.dll" starting with VS 2015. See the Visual C++ Team Blog: Introducing the Universal CRT http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx --- Modules/InstallRequiredSystemLibraries.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 5afb517d6..d8ede1c1e 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -172,8 +172,12 @@ if(MSVC) if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll" - "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll" ) + if(NOT v VERSION_LESS 14) + list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll") + else() + list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll") + endif() else() set(__install__libs) endif() @@ -183,8 +187,12 @@ if(MSVC) "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT") set(__install__libs ${__install__libs} "${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll" - "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll" ) + if(NOT v VERSION_LESS 14) + list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll") + else() + list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll") + endif() endif() endmacro()