summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-10-31 13:54:51 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 19:06:12 -0400
commit70a63ca331484575fbd6ffb432e40f6555bb8a51 (patch)
tree919dd62766e439592dd29498542cb94092ab53d5 /indra/cmake
parentec2bd40d3e318baf6f22ee7a7ccbc57cb071af40 (diff)
DRTVWR-476, SL-12205: Update to glod built with VS 2017 runtime libs.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake115
1 files changed, 38 insertions, 77 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 1e33205143..c3309b2195 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -74,96 +74,57 @@ if(WINDOWS)
#*******************************
# Copy MS C runtime dlls, required for packaging.
if (MSVC80)
- list(APPEND LMSVC_VER 80)
- list(APPEND LMSVC_VERDOT 8.0)
+ set(MSVC_VER 80)
elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010
MESSAGE(STATUS "MSVC_VERSION ${MSVC_VERSION}")
elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12
- list(APPEND LMSVC_VER 120)
- list(APPEND LMSVC_VERDOT 12.0)
+ set(MSVC_VER 120)
elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017
- list(APPEND LMSVC_VER 150)
- list(APPEND LMSVC_VERDOT 15.0)
+ set(MSVC_VER 140)
else (MSVC80)
MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake")
endif (MSVC80)
- # try to copy VS2010 redist independently of system version
- # maint-7360 CP
- # list(APPEND LMSVC_VER 100)
- # list(APPEND LMSVC_VERDOT 10.0)
-
- list(LENGTH LMSVC_VER count)
- math(EXPR count "${count}-1")
- foreach(i RANGE ${count})
- list(GET LMSVC_VER ${i} MSVC_VER)
- list(GET LMSVC_VERDOT ${i} MSVC_VERDOT)
- MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VERDOT}")
- FIND_PATH(debug_msvc_redist_path NAME msvcr${MSVC_VER}d.dll
- PATHS
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT
- [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
- [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
- ${MSVC_DEBUG_REDIST_PATH}
- NO_DEFAULT_PATH
- )
-
- if(EXISTS ${debug_msvc_redist_path})
- set(debug_msvc_files
- msvcr${MSVC_VER}d.dll
- msvcp${MSVC_VER}d.dll
- )
-
- copy_if_different(
- ${debug_msvc_redist_path}
- "${SHARED_LIB_STAGING_DIR_DEBUG}"
- out_targets
- ${debug_msvc_files}
- )
- set(third_party_targets ${third_party_targets} ${out_targets})
+ MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VER}")
+ if(ADDRESS_SIZE EQUAL 32)
+ # this folder contains the 32bit DLLs.. (yes really!)
+ set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64")
+ else(ADDRESS_SIZE EQUAL 32)
+ # this folder contains the 64bit DLLs.. (yes really!)
+ set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32")
+ endif(ADDRESS_SIZE EQUAL 32)
+
+ FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll
+ PATHS
+ ${registry_find_path}
+ NO_DEFAULT_PATH
+ )
- unset(debug_msvc_redist_path CACHE)
- endif()
+ if(EXISTS ${release_msvc_redist_path})
+ set(release_msvc_files
+ msvcp${MSVC_VER}.dll
+ msvcr${MSVC_VER}.dll
+ vcruntime${MSVC_VER}.dll
+ )
- if(ADDRESS_SIZE EQUAL 32)
- # this folder contains the 32bit DLLs.. (yes really!)
- set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64")
- else(ADDRESS_SIZE EQUAL 32)
- # this folder contains the 64bit DLLs.. (yes really!)
- set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32")
- endif(ADDRESS_SIZE EQUAL 32)
+ copy_if_different(
+ ${release_msvc_redist_path}
+ "${SHARED_LIB_STAGING_DIR_RELEASE}"
+ out_targets
+ ${release_msvc_files}
+ )
+ set(third_party_targets ${third_party_targets} ${out_targets})
- FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll
- PATHS
- ${registry_find_path}
- NO_DEFAULT_PATH
+ copy_if_different(
+ ${release_msvc_redist_path}
+ "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+ out_targets
+ ${release_msvc_files}
)
+ set(third_party_targets ${third_party_targets} ${out_targets})
- if(EXISTS ${release_msvc_redist_path})
- set(release_msvc_files
- msvcr${MSVC_VER}.dll
- msvcp${MSVC_VER}.dll
- )
-
- copy_if_different(
- ${release_msvc_redist_path}
- "${SHARED_LIB_STAGING_DIR_RELEASE}"
- out_targets
- ${release_msvc_files}
- )
- set(third_party_targets ${third_party_targets} ${out_targets})
-
- copy_if_different(
- ${release_msvc_redist_path}
- "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
- out_targets
- ${release_msvc_files}
- )
- set(third_party_targets ${third_party_targets} ${out_targets})
-
- unset(release_msvc_redist_path CACHE)
- endif()
- endforeach()
+ unset(release_msvc_redist_path CACHE)
+ endif()
elseif(DARWIN)
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")