[Cmake-commits] CMake branch, next, updated. v2.8.3-1338-gf07e4aa

David Cole david.cole at kitware.com
Thu Jan 13 13:14:42 EST 2011


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  f07e4aa1b6d2786259b84ef1ce46c5ea66743897 (commit)
       via  fc144924a0782b37c320378ac76482f0534c7530 (commit)
      from  84ba082054f7997d9aaeee88988e1ad8cf91908f (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f07e4aa1b6d2786259b84ef1ce46c5ea66743897
commit f07e4aa1b6d2786259b84ef1ce46c5ea66743897
Merge: 84ba082 fc14492
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 13 13:14:40 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 13 13:14:40 2011 -0500

    Merge topic 'fix-install-req-sys-libs' into next
    
    fc14492 VS10: Fix problems with InstallRequiredSystemLibraries.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc144924a0782b37c320378ac76482f0534c7530
commit fc144924a0782b37c320378ac76482f0534c7530
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 13 11:37:14 2011 -0500
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 13 13:08:59 2011 -0500

    VS10: Fix problems with InstallRequiredSystemLibraries.
    
    Thanks to "J Decker" on the CMake mailing list for pointing out
    that one of the MSVC10_CRT_DIR settings was using "VC90" instead
    of "VC100".
    
    After fixing that, I added the code to generate a CMake warning
    if one of the files we think is "required" does not exist.
    
    Then, with VS10, there were several other problems that the
    warning revealed:
    
     - MSVC10_REDIST_DIR needed more PATHS to be found correctly
    
     - the 64-bit directory is named "x64" now, not "amd64" as in
       previous VS versions
    
     - manifest files no longer exist as separate files in the
       redist subdirectories (they must be built-in as resources
       to the dlls...?)

diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 4564e74..63b3d5e 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -33,6 +33,21 @@
 IF(MSVC)
   FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
 
+  IF(CMAKE_CL_64)
+    IF(MSVC_VERSION GREATER 1599)
+      # VS 10 and later:
+      SET(CMAKE_MSVC_ARCH x64)
+    ELSE()
+      # VS 9 and earlier:
+      SET(CMAKE_MSVC_ARCH amd64)
+    ENDIF()
+  ELSE(CMAKE_CL_64)
+    SET(CMAKE_MSVC_ARCH x86)
+  ENDIF(CMAKE_CL_64)
+
+  GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
+  GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
+
   IF(MSVC70)
     SET(__install__libs
       "${SYSTEMROOT}/system32/msvcp70.dll"
@@ -47,15 +62,6 @@ IF(MSVC)
       )
   ENDIF(MSVC71)
 
-  IF(CMAKE_CL_64)
-    SET(CMAKE_MSVC_ARCH amd64)
-  ELSE(CMAKE_CL_64)
-    SET(CMAKE_MSVC_ARCH x86)
-  ENDIF(CMAKE_CL_64)
-
-  GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
-  GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
-
   IF(MSVC80)
     # Find the runtime library redistribution directory.
     FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
@@ -87,7 +93,6 @@ IF(MSVC)
         "${MSVC80_CRT_DIR}/msvcr80d.dll"
         )
     ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
   ENDIF(MSVC80)
 
   IF(MSVC90)
@@ -130,15 +135,14 @@ IF(MSVC)
       PATHS
         "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
         "${base_dir}/VC/redist"
+        "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist"
+        "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist"
       )
     MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
     SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
 
-    # Install the manifest that allows DLLs to be loaded from the
-    # directory containing the executable.
     IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
       SET(__install__libs
-        "${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
         "${MSVC10_CRT_DIR}/msvcp100.dll"
         "${MSVC10_CRT_DIR}/msvcr100.dll"
         )
@@ -146,9 +150,8 @@ IF(MSVC)
 
     IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
       SET(MSVC10_CRT_DIR
-        "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
+        "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT")
       SET(__install__libs ${__install__libs}
-        "${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
         "${MSVC10_CRT_DIR}/msvcp100d.dll"
         "${MSVC10_CRT_DIR}/msvcr100d.dll"
         )
@@ -161,11 +164,13 @@ IF(MSVC)
         "${SYSTEMROOT}/system32/mfc70.dll"
         )
     ENDIF(MSVC70)
+
     IF(MSVC71)
       SET(__install__libs ${__install__libs}
         "${SYSTEMROOT}/system32/mfc71.dll"
         )
     ENDIF(MSVC71)
+
     IF(MSVC80)
       IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
         SET(MSVC80_MFC_DIR
@@ -259,7 +264,6 @@ IF(MSVC)
         SET(MSVC10_MFC_DIR
           "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
         SET(__install__libs ${__install__libs}
-          "${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
           "${MSVC10_MFC_DIR}/mfc100d.dll"
           "${MSVC10_MFC_DIR}/mfc100ud.dll"
           "${MSVC10_MFC_DIR}/mfcm100d.dll"
@@ -268,11 +272,8 @@ IF(MSVC)
       ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
 
       SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
       IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
         SET(__install__libs ${__install__libs}
-          "${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
           "${MSVC10_MFC_DIR}/mfc100.dll"
           "${MSVC10_MFC_DIR}/mfc100u.dll"
           "${MSVC10_MFC_DIR}/mfcm100.dll"
@@ -282,10 +283,7 @@ IF(MSVC)
 
       # include the language dll's for vs10 as well as the actuall dll's
       SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
       SET(__install__libs ${__install__libs}
-        "${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
         "${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
         "${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
         "${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
@@ -297,7 +295,6 @@ IF(MSVC)
         "${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
         )
     ENDIF(MSVC10)
-
   ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
 
   FOREACH(lib
@@ -306,6 +303,10 @@ IF(MSVC)
     IF(EXISTS ${lib})
       SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
         ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
+    ELSE(EXISTS ${lib})
+      MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+      # This warning indicates an incomplete Visual Studio installation
+      # or a bug somewhere above here in this file
     ENDIF(EXISTS ${lib})
   ENDFOREACH(lib)
 ENDIF(MSVC)

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

Summary of changes:
 Modules/InstallRequiredSystemLibraries.cmake |   47 +++++++++++++------------
 1 files changed, 24 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list