diff options
author | David Cole <david.cole@kitware.com> | 2008-11-13 22:12:41 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2008-11-13 22:12:41 (GMT) |
commit | d78eab74ebf4b082d37f24d59afc161f196ff5da (patch) | |
tree | 77e5252bdacaef5b232b614eb026d025bd535830 /Modules/InstallRequiredSystemLibraries.cmake | |
parent | 73117edf04d88f0f908e13cf1fcb8c58d31fcc15 (diff) | |
download | CMake-d78eab74ebf4b082d37f24d59afc161f196ff5da.zip CMake-d78eab74ebf4b082d37f24d59afc161f196ff5da.tar.gz CMake-d78eab74ebf4b082d37f24d59afc161f196ff5da.tar.bz2 |
BUG: Because of Windows registry madness, we could not find the redistributables directory on Win64 builds... Add a search directory based on devenv (CMAKE_MAKE_PROGRAM) location so we can find it despite the madness.
Diffstat (limited to 'Modules/InstallRequiredSystemLibraries.cmake')
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 7744dfa..057924c 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -14,12 +14,14 @@ IF(MSVC) FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT) + IF(MSVC70) SET(__install__libs "${SYSTEMROOT}/system32/msvcp70.dll" "${SYSTEMROOT}/system32/msvcr70.dll" ) ENDIF(MSVC70) + IF(MSVC71) SET(__install__libs "${SYSTEMROOT}/system32/msvcp71.dll" @@ -33,10 +35,15 @@ IF(MSVC) SET(CMAKE_MSVC_ARCH x86) ENDIF(CMAKE_CL_64) + GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH) + GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE) + IF(MSVC80) # Find the runtime library redistribution directory. FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest - PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist" + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist" + "${base_dir}/VC/redist" ) MARK_AS_ADVANCED(MSVC80_REDIST_DIR) SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT") @@ -62,16 +69,18 @@ IF(MSVC) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(MSVC80) + IF(MSVC90) # Find the runtime library redistribution directory. FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest - PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist" - - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist" + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist" + "${base_dir}/VC/redist" ) MARK_AS_ADVANCED(MSVC90_REDIST_DIR) SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT") - + # Install the manifest that allows DLLs to be loaded from the # directory containing the executable. SET(__install__libs @@ -91,6 +100,7 @@ IF(MSVC) ) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(MSVC90) + IF(CMAKE_INSTALL_MFC_LIBRARIES) IF(MSVC70) SET(__install__libs ${__install__libs} @@ -142,6 +152,7 @@ IF(MSVC) "${MSVC80_MFCLOC_DIR}/mfc80kor.dll" ) ENDIF(MSVC80) + IF(MSVC90) IF(CMAKE_INSTALL_DEBUG_LIBRARIES) SET(MSVC90_MFC_DIR @@ -184,6 +195,7 @@ IF(MSVC) ENDIF(MSVC90) ENDIF(CMAKE_INSTALL_MFC_LIBRARIES) + FOREACH(lib ${__install__libs} ) @@ -205,5 +217,3 @@ IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) ENDIF(WIN32) ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) - - |