diff -r 303e8a344562 indra/cmake/Copy3rdPartyLibs.cmake --- a/indra/cmake/Copy3rdPartyLibs.cmake Sun Jan 30 22:39:26 2011 -0600 +++ b/indra/cmake/Copy3rdPartyLibs.cmake Mon Jan 31 09:21:04 2011 -0600 @@ -59,129 +59,80 @@ set(debug_files ${debug_files} fmod.dll) set(release_files ${release_files} fmod.dll) endif (FMOD) - #******************************* # Copy MS C runtime dlls, required for packaging. -# *TODO - Adapt this to support VC9 -if (MSVC80) - FIND_PATH(debug_msvc8_redist_path msvcr80d.dll +# Supports any versions that 00-Common.cmake understands + if (MSVC71) + set(MSVC_DIR 7.1) + set(MSVC_SUFFIX 71) + elseif (MSVC80) + set(MSVC_DIR 8.0) + set(MSVC_SUFFIX 80) + elseif (MSVC90) + set(MSVC_DIR 9.0) + set(MSVC_SUFFIX 90) + elseif (MSVC10) + set(MSVC_DIR 10.0) + set(MSVC_SUFFIX 100) + endif (MSVC71) + + FIND_PATH(debug_msvc_redist_path msvcr${MSVC_SUFFIX}d.dll PATHS ${MSVC_DEBUG_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_DIR}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_SUFFIX}.DebugCRT NO_DEFAULT_PATH NO_DEFAULT_PATH ) - if(EXISTS ${debug_msvc8_redist_path}) + if(EXISTS ${debug_msvc_redist_path}) set(debug_msvc8_files - msvcr80d.dll - msvcp80d.dll - Microsoft.VC80.DebugCRT.manifest + msvcr${MSVC_SUFFIX}d.dll + msvcp${MSVC_SUFFIX}d.dll + Microsoft.VC${MSVC_SUFFIX}.DebugCRT.manifest ) copy_if_different( - ${debug_msvc8_redist_path} + ${debug_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_DEBUG}" out_targets - ${debug_msvc8_files} + ${debug_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) - endif (EXISTS ${debug_msvc8_redist_path}) + endif (EXISTS ${debug_msvc_redist_path}) - FIND_PATH(release_msvc8_redist_path msvcr80.dll + FIND_PATH(release_msvc_redist_path msvcr${MSVC_SUFFIX}.dll PATHS - ${MSVC_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + ${MSVC_REDIST_PATH} + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_DIR}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_SUFFIX}.CRT NO_DEFAULT_PATH NO_DEFAULT_PATH ) - if(EXISTS ${release_msvc8_redist_path}) - set(release_msvc8_files - msvcr80.dll - msvcp80.dll - Microsoft.VC80.CRT.manifest + if(EXISTS ${release_msvc_redist_path}) + set(release_msvc_files + msvcr${MSVC_SUFFIX}.dll + msvcp${MSVC_SUFFIX}.dll + Microsoft.VC${MSVC_SUFFIX}.CRT.manifest ) copy_if_different( - ${release_msvc8_redist_path} + ${release_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_RELEASE}" out_targets - ${release_msvc8_files} + ${release_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) copy_if_different( - ${release_msvc8_redist_path} + ${release_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" out_targets - ${release_msvc8_files} + ${release_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) - endif (EXISTS ${release_msvc8_redist_path}) -endif (MSVC80) -if (MSVC10) - FIND_PATH(debug_msvc10_redist_path msvcr100d.dll - PATHS - ${MSVC_DEBUG_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT - NO_DEFAULT_PATH - NO_DEFAULT_PATH - ) - - if(EXISTS ${debug_msvc10_redist_path}) - set(debug_msvc10_files - msvcr100d.dll - msvcp100d.dll - Microsoft.VC100.DebugCRT.manifest - ) - - copy_if_different( - ${debug_msvc10_redist_path} - "${SHARED_LIB_STAGING_DIR_DEBUG}" - out_targets - ${debug_msvc10_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - endif (EXISTS ${debug_msvc10_redist_path}) - - FIND_PATH(release_msvc10_redist_path msvcr100.dll - PATHS - ${MSVC_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT - NO_DEFAULT_PATH - NO_DEFAULT_PATH - ) - - if(EXISTS ${release_msvc10_redist_path}) - set(release_msvc10_files - msvcr100.dll - msvcp100.dll - Microsoft.VC100.CRT.manifest - ) - - copy_if_different( - ${release_msvc10_redist_path} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${release_msvc10_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - copy_if_different( - ${release_msvc10_redist_path} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets - ${release_msvc10_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - endif (EXISTS ${release_msvc10_redist_path}) -endif (MSVC10) - + endif (EXISTS ${release_msvc_redist_path}) elseif(DARWIN) set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")