summaryrefslogtreecommitdiffstats
path: root/Modules/InstallRequiredSystemLibraries.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-12-17 19:57:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-12-17 19:57:49 (GMT)
commit23c28adbf9742475bc41dcb81395286afc96a057 (patch)
treea4a571e65a0b98b2ce6088b428beadc8309d3812 /Modules/InstallRequiredSystemLibraries.cmake
parent0477e979880607c7525a067899d1a461c54bde25 (diff)
downloadCMake-23c28adbf9742475bc41dcb81395286afc96a057.zip
CMake-23c28adbf9742475bc41dcb81395286afc96a057.tar.gz
CMake-23c28adbf9742475bc41dcb81395286afc96a057.tar.bz2
Fix for bug 9960, add support for MSVC10 runtime dlls.
Diffstat (limited to 'Modules/InstallRequiredSystemLibraries.cmake')
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake69
1 files changed, 69 insertions, 0 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 9746809..97c6ccb 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -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