Browse Source

Merge branch 'InstallRequiredSystemLibraries-redist' into release-3.15

Merge-request: !4247
Brad King 5 years ago
parent
commit
a3f9a9ab55
1 changed files with 20 additions and 6 deletions
  1. 20 6
      Modules/InstallRequiredSystemLibraries.cmake

+ 20 - 6
Modules/InstallRequiredSystemLibraries.cmake

@@ -288,9 +288,16 @@ if(MSVC)
         "${MSVC_CRT_DIR}/msvcp${v}.dll"
         )
       if(NOT vs VERSION_LESS 14)
-        if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1.dll")
-          list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1.dll")
-        endif()
+        foreach(crt
+            "${MSVC_CRT_DIR}/msvcp${v}_1.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}_2.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}_codecvt_ids.dll"
+            "${MSVC_CRT_DIR}/vcruntime${v}_1.dll"
+            )
+          if(EXISTS "${crt}")
+            list(APPEND __install__libs "${crt}")
+          endif()
+        endforeach()
         list(APPEND __install__libs
             "${MSVC_CRT_DIR}/vcruntime${v}.dll"
             "${MSVC_CRT_DIR}/concrt${v}.dll"
@@ -309,9 +316,16 @@ if(MSVC)
         "${MSVC_CRT_DIR}/msvcp${v}d.dll"
         )
       if(NOT vs VERSION_LESS 14)
-        if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll")
-          list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll")
-        endif()
+        foreach(crt
+            "${MSVC_CRT_DIR}/msvcp${v}_1d.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}_2d.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}d_codecvt_ids.dll"
+            "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll"
+            )
+          if(EXISTS "${crt}")
+            list(APPEND __install__libs "${crt}")
+          endif()
+        endforeach()
         list(APPEND __install__libs
             "${MSVC_CRT_DIR}/vcruntime${v}d.dll"
             "${MSVC_CRT_DIR}/concrt${v}d.dll"