summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-06-04 10:36:52 -0700
committerBrad Linden <brad@lindenlab.com>2024-06-04 10:36:52 -0700
commitfdbf73d95392e2dc64e3193a9cc3ea4c8260b8dc (patch)
tree445d8bd89ab9541db02d04e253869a96cdcd03d6 /indra/cmake
parent0f6ef1643e6149a40aa605ad8f44d89df843bd80 (diff)
parent08c483c2693153f49cfacb8cf517cf6067f53205 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into project/gltf_development
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index a2ce9eab90..30dee3c6c1 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -98,14 +98,27 @@ if(WINDOWS)
set(MSVC_VER 120)
elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017
set(MSVC_VER 140)
+ set(MSVC_TOOLSET_VER 141)
elseif (MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930) # Visual Studio 2019
set(MSVC_VER 140)
- elseif (MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1940) # Visual Studio 2022
+ set(MSVC_TOOLSET_VER 142)
+ elseif (MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1950) # Visual Studio 2022
set(MSVC_VER 140)
+ set(MSVC_TOOLSET_VER 143)
else (MSVC80)
MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake")
endif (MSVC80)
+ if (MSVC_TOOLSET_VER AND DEFINED ENV{VCTOOLSREDISTDIR})
+ if(ADDRESS_SIZE EQUAL 32)
+ set(redist_find_path "$ENV{VCTOOLSREDISTDIR}x86\\Microsoft.VC${MSVC_TOOLSET_VER}.CRT")
+ else(ADDRESS_SIZE EQUAL 32)
+ set(redist_find_path "$ENV{VCTOOLSREDISTDIR}x64\\Microsoft.VC${MSVC_TOOLSET_VER}.CRT")
+ endif(ADDRESS_SIZE EQUAL 32)
+ get_filename_component(redist_path "${redist_find_path}" ABSOLUTE)
+ MESSAGE(STATUS "VC Runtime redist path: ${redist_path}")
+ endif (MSVC_TOOLSET_VER AND DEFINED ENV{VCTOOLSREDISTDIR})
+
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")
@@ -128,7 +141,14 @@ if(WINDOWS)
vcruntime${MSVC_VER}.dll
vcruntime${MSVC_VER}_1.dll
)
- if(EXISTS "${registry_path}/${release_msvc_file}")
+ if(redist_path AND EXISTS "${redist_path}/${release_msvc_file}")
+ MESSAGE(STATUS "Copying redist file from ${redist_path}/${release_msvc_file}")
+ to_staging_dirs(
+ ${redist_path}
+ third_party_targets
+ ${release_msvc_file})
+ elseif(EXISTS "${registry_path}/${release_msvc_file}")
+ MESSAGE(STATUS "Copying redist file from ${registry_path}/${release_msvc_file}")
to_staging_dirs(
${registry_path}
third_party_targets