diff options
author | Brad King <brad.king@kitware.com> | 2017-01-12 15:21:56 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-12 15:21:56 (GMT) |
commit | e31986b90058a46071f7fe4a52788de6b42cb96c (patch) | |
tree | 9b4dd54251c95bfc1919befbc438fb5c60fd12ca /Modules/InstallRequiredSystemLibraries.cmake | |
parent | bc09abd7d07064ed046cdc8e959b443d69f77596 (diff) | |
parent | e0ed1de4fb5e9d18c2d00775229496079d6e077a (diff) | |
download | CMake-e31986b90058a46071f7fe4a52788de6b42cb96c.zip CMake-e31986b90058a46071f7fe4a52788de6b42cb96c.tar.gz CMake-e31986b90058a46071f7fe4a52788de6b42cb96c.tar.bz2 |
Merge topic 'InstallRequiredSystemLibraries-UCRT-configs'
e0ed1de4 InstallRequiredSystemLibraries: Distinguish UCRT install configurations
Diffstat (limited to 'Modules/InstallRequiredSystemLibraries.cmake')
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index f4ae091..7975bd4 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -210,21 +210,27 @@ if(MSVC) endif() if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14) - # Find the Windows Universal CRT redistribution directory. + # Find the Windows Kits directory. get_filename_component(windows_kits_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE) set(programfilesx86 "ProgramFiles(x86)") - find_path(WINDOWS_KITS_REDIST_DIR NAMES ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll + find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll PATHS - "${windows_kits_dir}/Redist" - "$ENV{ProgramFiles}/Windows Kits/10/Redist" - "$ENV{${programfilesx86}}/Windows Kits/10/Redist" + "${windows_kits_dir}" + "$ENV{ProgramFiles}/Windows Kits/10" + "$ENV{${programfilesx86}}/Windows Kits/10" ) - mark_as_advanced(WINDOWS_KITS_REDIST_DIR) + mark_as_advanced(WINDOWS_KITS_DIR) # Glob the list of UCRT DLLs. - file(GLOB __ucrt_dlls "${WINDOWS_KITS_REDIST_DIR}/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") - list(APPEND __install__libs ${__ucrt_dlls}) + if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") + list(APPEND __install__libs ${__ucrt_dlls}) + endif() + if(CMAKE_INSTALL_DEBUG_LIBRARIES) + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll") + list(APPEND __install__libs ${__ucrt_dlls}) + endif() endif() endmacro() |