[Cmake-commits] CMake branch, next, updated. v3.5.2-1355-gab5baf8

Brad King brad.king at kitware.com
Thu May 12 11:13:46 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ab5baf898f59db8e558782e7056f881449015e34 (commit)
       via  6b0b0660740e879ba90cc4a69293a46ad28c896c (commit)
       via  bbf8c03b4f04ffcf2bd96b6408e4fa3598b2526f (commit)
      from  4bb3daa881769cb309aaa12a0f796c92c2b7eb18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab5baf898f59db8e558782e7056f881449015e34
commit ab5baf898f59db8e558782e7056f881449015e34
Merge: 4bb3daa 6b0b066
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 12 11:13:44 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 12 11:13:44 2016 -0400

    Merge topic 'InstallRequiredSystemLibraries-Windows-UCRT' into next
    
    6b0b0660 InstallRequiredSystemLibraries: Optionally install Windows UCRT (#16073)
    bbf8c03b InstallRequiredSystemLibraries: Fix ENV{ProgramFiles(x86)} reference


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b0b0660740e879ba90cc4a69293a46ad28c896c
commit 6b0b0660740e879ba90cc4a69293a46ad28c896c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 12 11:10:23 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 12 11:10:23 2016 -0400

    InstallRequiredSystemLibraries: Optionally install Windows UCRT (#16073)

diff --git a/Help/release/dev/InstallRequiredSystemLibraries-Windows-UCRT.rst b/Help/release/dev/InstallRequiredSystemLibraries-Windows-UCRT.rst
new file mode 100644
index 0000000..e52531d
--- /dev/null
+++ b/Help/release/dev/InstallRequiredSystemLibraries-Windows-UCRT.rst
@@ -0,0 +1,6 @@
+InstallRequiredSystemLibraries-Windows-UCRT
+-------------------------------------------
+
+* The :module:`InstallRequiredSystemLibraries` module learned a new
+  ``CMAKE_INSTALL_UCRT_LIBRARIES`` option to enable app-local deployment
+  of the Windows Universal CRT libraries with Visual Studio 2015.
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 89f3d50..aa84077 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -23,6 +23,11 @@
 #   Set to TRUE to install only the debug runtime libraries with MSVC
 #   tools even if the release runtime libraries are also available.
 #
+# ``CMAKE_INSTALL_UCRT_LIBRARIES``
+#   Set to TRUE to install the Windows Universal CRT libraries for
+#   app-local deployment.  This is meaningful only with MSVC from
+#   Visual Studio 2015 or higher.
+#
 # ``CMAKE_INSTALL_MFC_LIBRARIES``
 #   Set to TRUE to install the MSVC MFC runtime libraries.
 #
@@ -207,6 +212,24 @@ if(MSVC)
         list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll")
       endif()
     endif()
+
+    if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14)
+      # Find the Windows Universal CRT redistribution 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
+        PATHS
+        "${windows_kits_dir}/Redist"
+        "$ENV{ProgramFiles}/Windows Kits/10/Redist"
+        "$ENV{${programfilesx86}}/Windows Kits/10/Redist"
+        )
+      mark_as_advanced(WINDOWS_KITS_REDIST_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})
+    endif()
   endmacro()
 
   if(MSVC10)
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 2737f18..aee92f6 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -364,6 +364,7 @@ endif()
 set(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
 set(CMAKE_INSTALL_MFC_LIBRARIES 1)
 set(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
+set(CMAKE_INSTALL_UCRT_LIBRARIES 1)
 include(InstallRequiredSystemLibraries)
 
 if(CTEST_TEST_CPACK)
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index 2737f18..aee92f6 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -364,6 +364,7 @@ endif()
 set(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
 set(CMAKE_INSTALL_MFC_LIBRARIES 1)
 set(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
+set(CMAKE_INSTALL_UCRT_LIBRARIES 1)
 include(InstallRequiredSystemLibraries)
 
 if(CTEST_TEST_CPACK)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbf8c03b4f04ffcf2bd96b6408e4fa3598b2526f
commit bbf8c03b4f04ffcf2bd96b6408e4fa3598b2526f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 12 10:54:59 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 12 11:08:40 2016 -0400

    InstallRequiredSystemLibraries: Fix ENV{ProgramFiles(x86)} reference
    
    The fix in commit v3.1.0-rc1~544^2~5 (Windows: Avoid () in environment
    variable references, 2014-05-02) introduced a set() command in the
    middle of an argument list.  Move it to before the find_path() call.

diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 2ff9aed..89f3d50 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -171,12 +171,12 @@ if(MSVC)
     # Find the runtime library redistribution directory.
     get_filename_component(msvc_install_dir
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
+    set(programfilesx86 "ProgramFiles(x86)")
     find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
       PATHS
         "${msvc_install_dir}/../../VC/redist"
         "${base_dir}/VC/redist"
         "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
-        set(programfilesx86 "ProgramFiles(x86)")
         "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist"
       )
     mark_as_advanced(MSVC${v}_REDIST_DIR)

-----------------------------------------------------------------------

Summary of changes:
 ...InstallRequiredSystemLibraries-Windows-UCRT.rst |    6 +++++
 Modules/InstallRequiredSystemLibraries.cmake       |   25 +++++++++++++++++++-
 Tests/SimpleInstall/CMakeLists.txt                 |    1 +
 Tests/SimpleInstallS2/CMakeLists.txt               |    1 +
 4 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 Help/release/dev/InstallRequiredSystemLibraries-Windows-UCRT.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list