Fix for bug 9960, add support for MSVC10 runtime dlls.

This commit is contained in:
Bill Hoffman 2009-12-17 14:57:49 -05:00
parent 0477e97988
commit 23c28adbf9
1 changed files with 69 additions and 0 deletions

View File

@ -114,6 +114,34 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC90)
IF(MSVC10)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs
"${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100.dll"
"${MSVC10_CRT_DIR}/msvcr100.dll"
)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_CRT_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
SET(__install__libs ${__install__libs}
"${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC10)
IF(CMAKE_INSTALL_MFC_LIBRARIES)
IF(MSVC70)
SET(__install__libs ${__install__libs}
@ -207,6 +235,47 @@ IF(MSVC)
)
ENDIF(MSVC90)
IF(MSVC10)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
SET(__install__libs ${__install__libs}
"${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
"${MSVC10_MFC_DIR}/mfc100d.dll"
"${MSVC10_MFC_DIR}/mfc100ud.dll"
"${MSVC10_MFC_DIR}/mfcm100d.dll"
"${MSVC10_MFC_DIR}/mfcm100ud.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs ${__install__libs}
"${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
"${MSVC10_MFC_DIR}/mfc100.dll"
"${MSVC10_MFC_DIR}/mfc100u.dll"
"${MSVC10_MFC_DIR}/mfcm100.dll"
"${MSVC10_MFC_DIR}/mfcm100u.dll"
)
# include the language dll's for vs10 as well as the actuall dll's
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs ${__install__libs}
"${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
"${MSVC10_MFCLOC_DIR}/mfc100esp.dll"
"${MSVC10_MFCLOC_DIR}/mfc100deu.dll"
"${MSVC10_MFCLOC_DIR}/mfc100fra.dll"
"${MSVC10_MFCLOC_DIR}/mfc100ita.dll"
"${MSVC10_MFCLOC_DIR}/mfc100jpn.dll"
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
)
ENDIF(MSVC10)
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib