Sfoglia il codice sorgente

Merge branch 'InstallRequiredSystemLibraries-redist' into release-3.15

Merge-request: !3909
Brad King 6 anni fa
parent
commit
83dbef1135
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      Modules/InstallRequiredSystemLibraries.cmake

+ 7 - 0
Modules/InstallRequiredSystemLibraries.cmake

@@ -258,6 +258,7 @@ if(MSVC)
         cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query
         if(IS_DIRECTORY "${_vs_dir}")
           file(GLOB _vs_glob_redist_paths "${_vs_dir}/VC/Redist/MSVC/*")
+          list(REVERSE _vs_glob_redist_paths)
           list(APPEND _vs_redist_paths ${_vs_glob_redist_paths})
         endif()
         unset(_vs_glob_redist_paths)
@@ -287,6 +288,9 @@ 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()
         list(APPEND __install__libs
             "${MSVC_CRT_DIR}/vcruntime${v}.dll"
             "${MSVC_CRT_DIR}/concrt${v}.dll"
@@ -305,6 +309,9 @@ 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()
         list(APPEND __install__libs
             "${MSVC_CRT_DIR}/vcruntime${v}d.dll"
             "${MSVC_CRT_DIR}/concrt${v}d.dll"