From 2eecd1c3bce761510f7090629c807a93e3742b1e Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Oct 2019 11:57:39 -0400 Subject: IRSL: Prefer MSVC runtime libraries from newest toolset first --- Modules/InstallRequiredSystemLibraries.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index e3eeea4..0f8c560 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -258,6 +258,7 @@ if(MSVC) cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query if(IS_DIRECTORY "${_vs_dir}") file(GLOB _vs_glob_redist_paths "${_vs_dir}/VC/Redist/MSVC/*") + list(REVERSE _vs_glob_redist_paths) list(APPEND _vs_redist_paths ${_vs_glob_redist_paths}) endif() unset(_vs_glob_redist_paths) -- cgit v0.12 From ecbf6546d7b4b28ddda40649ecf9d7a4cbe12dcc Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Oct 2019 12:04:28 -0400 Subject: IRSL: Install vcruntime140_1.dll if available VS 2019 now distributes this additional runtime DLL with its `14.2x` toolsets. Fixes: #19829 --- Modules/InstallRequiredSystemLibraries.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 0f8c560..0e1429d 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -288,6 +288,9 @@ if(MSVC) "${MSVC_CRT_DIR}/msvcp${v}.dll" ) if(NOT vs VERSION_LESS 14) + if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1.dll") + endif() list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}.dll" "${MSVC_CRT_DIR}/concrt${v}.dll" @@ -306,6 +309,9 @@ if(MSVC) "${MSVC_CRT_DIR}/msvcp${v}d.dll" ) if(NOT vs VERSION_LESS 14) + if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll") + endif() list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}d.dll" "${MSVC_CRT_DIR}/concrt${v}d.dll" -- cgit v0.12