diff options
author | Brad King <brad.king@kitware.com> | 2014-05-07 13:13:32 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-07 13:13:32 (GMT) |
commit | 623fcc2972295dff7a515fbf0f1fbb3221f2c4a1 (patch) | |
tree | b2549df3730983c2bce09047d27388e492c35458 /Modules | |
parent | b4479ec0b96fce54748984c1968115d260e17328 (diff) | |
parent | c0a6646d2fdff6ccd6f217096d60a9f004c14b51 (diff) | |
download | CMake-623fcc2972295dff7a515fbf0f1fbb3221f2c4a1.zip CMake-623fcc2972295dff7a515fbf0f1fbb3221f2c4a1.tar.gz CMake-623fcc2972295dff7a515fbf0f1fbb3221f2c4a1.tar.bz2 |
Merge topic 'InstallRequiredSystemLibraries-vs12-mfc'
c0a6646d InstallRequiredSystemLibraries: MBCS MFC is optional on VS 12 (#14903)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 4b551e6..307aafc 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -295,25 +295,42 @@ if(MSVC) macro(MFC_FILES_FOR_VERSION version) set(v "${version}") + # Multi-Byte Character Set versions of MFC are available as optional + # addon since Visual Studio 12. So for version 12 or higher, check + # whether they are available and exclude them if they are not. + if("${v}" LESS 12 OR EXISTS "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll") + set(mbcs ON) + else() + set(mbcs OFF) + endif() + if(CMAKE_INSTALL_DEBUG_LIBRARIES) set(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC") set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0ud.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0ud.dll" ) + if(mbcs) + set(__install__libs ${__install__libs} + "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll" + "${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll" + ) + endif() endif() set(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC") if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) set(__install__libs ${__install__libs} - "${MSVC${v}_MFC_DIR}/mfc${v}0.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0u.dll" - "${MSVC${v}_MFC_DIR}/mfcm${v}0.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0u.dll" ) + if(mbcs) + set(__install__libs ${__install__libs} + "${MSVC${v}_MFC_DIR}/mfc${v}0.dll" + "${MSVC${v}_MFC_DIR}/mfcm${v}0.dll" + ) + endif() endif() # include the language dll's as well as the actuall dll's |