summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-05-27 10:47:54 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-27 16:12:24 +0300
commit7e645bd42d6e9cf403c4b4b7d7eb070c5bb1ebf3 (patch)
treeb1d05c5d72354f1d3fefa9f0e11657ffb7a73b3b
parent2696b3de088877c3a406e817ed232c252700a16c (diff)
Try copying the VC++ runtime files from the redistributable package first
-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