[Cmake-commits] CMake branch, next, updated. v2.8.7-2191-g68e7a89

Eric Noulard eric.noulard at gmail.com
Sun Jan 22 13:32:47 EST 2012


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  68e7a89ea1c44f53e146e9e9d6e06d6702b0615a (commit)
       via  3cab24a9740ad1d35e548629f6dda12e166ef49e (commit)
      from  6de2163c895d1ee84e4c49e6895071567d18a4d0 (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=68e7a89ea1c44f53e146e9e9d6e06d6702b0615a
commit 68e7a89ea1c44f53e146e9e9d6e06d6702b0615a
Merge: 6de2163 3cab24a
Author:     Eric Noulard <eric.noulard at gmail.com>
AuthorDate: Sun Jan 22 13:32:08 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 22 13:32:08 2012 -0500

    Merge topic 'AddTopLevelForComponent' into next
    
    3cab24a CPack  Add top level directory in component install for Archive Generators


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cab24a9740ad1d35e548629f6dda12e166ef49e
commit 3cab24a9740ad1d35e548629f6dda12e166ef49e
Author:     Daniel Nelson <torham at connect2.com>
AuthorDate: Fri Jan 13 22:01:53 2012 +0100
Commit:     Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Fri Jan 13 22:01:53 2012 +0100

    CPack  Add top level directory in component install for Archive Generators
    
    This patch fixes bug #0012129
    Signed-off-by: Eric NOULARD <eric.noulard at gmail.com>

diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 0ce5b01..12d1796 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -57,13 +57,20 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
   std::string dir = cmSystemTools::GetCurrentWorkingDirectory();
   // Change to local toplevel
   cmSystemTools::ChangeDirectory(localToplevel.c_str());
+  std::string filePrefix;
+  if (this->IsOn("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))
+    {
+    filePrefix = this->GetOption("CPACK_PACKAGE_FILE_NAME");
+    filePrefix += "/";
+    }
   std::vector<std::string>::const_iterator fileIt;
   for (fileIt = component->Files.begin(); fileIt != component->Files.end();
        ++fileIt )
     {
+    std::string rp = filePrefix + *fileIt;
     cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: "
-                  << (*fileIt) << std::endl);
-    archive.Add(*fileIt);
+                  << rp << std::endl);
+    archive.Add(rp);
     if (!archive)
       {
       cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 083279f..01ed4df 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -691,6 +691,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
           //  one install directory for each component.
           tempInstallDirectory +=
             GetComponentInstallDirNameSuffix(installComponent);
+          if (this->IsOn("CPACK_INCLUDE_TOPLEVEL_DIRECTORY"))
+            {
+            tempInstallDirectory += "/";
+            tempInstallDirectory += this->GetOption("CPACK_PACKAGE_FILE_NAME");
+            }
           }
 
         if (!setDestDir)

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

Summary of changes:
 Source/CPack/cmCPackArchiveGenerator.cxx |   11 +++++++++--
 Source/CPack/cmCPackGenerator.cxx        |    5 +++++
 2 files changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list