Browse Source

InstallRequiredSystemLibraries: Check for existence of mfcm dlls

Previously, only existence of `mfc${v}.dll` and `mfc${v}d.dll` variants
was checked and it was assumed that the managed variants `mfcm*.dll`
also existed.  This assumption doesn't hold with Visual Studio 2017.
Check each file separately.

Fixes: #17913
Christof Krüger 7 years ago
parent
commit
bdf660cab5
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Modules/InstallRequiredSystemLibraries.cmake

+ 8 - 0
Modules/InstallRequiredSystemLibraries.cmake

@@ -481,6 +481,10 @@ if(MSVC)
         if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
           set(__install__libs ${__install__libs}
             "${MSVC_MFC_DIR}/mfc${v}d.dll"
+          )
+        endif()
+        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}d.dll")
+          set(__install__libs ${__install__libs}
             "${MSVC_MFC_DIR}/mfcm${v}d.dll"
           )
         endif()
@@ -495,6 +499,10 @@ if(MSVC)
         if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
           set(__install__libs ${__install__libs}
             "${MSVC_MFC_DIR}/mfc${v}.dll"
+          )
+        endif()
+        if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}.dll")
+          set(__install__libs ${__install__libs}
             "${MSVC_MFC_DIR}/mfcm${v}.dll"
           )
         endif()