[Cmake-commits] CMake branch, next, updated. v2.8.12-3939-gd3b8170

Nils Gladitz nilsgladitz at gmail.com
Sun Oct 13 07:26:23 EDT 2013


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  d3b8170b1e28a9cce2b90cdcfb4db351b691c5f0 (commit)
       via  2e6cadde13690a80bc3919cec00e802208367f32 (commit)
       via  de94782bc503742e1fddcf1d465f8fb3d6acb343 (commit)
       via  dca43862f13e1481619fc3ff286662ee93d14af9 (commit)
      from  9f33369dd187322ae12cd5a20dbfc91e019ece5c (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=d3b8170b1e28a9cce2b90cdcfb4db351b691c5f0
commit d3b8170b1e28a9cce2b90cdcfb4db351b691c5f0
Merge: 9f33369 2e6cadd
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sun Oct 13 07:26:21 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Oct 13 07:26:21 2013 -0400

    Merge topic 'wix-extra-sources' into next
    
    2e6cadd CPackWiX: allow user supplied extra sources, objects and libraries
    de94782 CMake Nightly Date Stamp
    dca4386 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e6cadde13690a80bc3919cec00e802208367f32
commit 2e6cadde13690a80bc3919cec00e802208367f32
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sun Oct 13 13:16:54 2013 +0200
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Sun Oct 13 13:16:54 2013 +0200

    CPackWiX: allow user supplied extra sources, objects and libraries

diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index fce25f0..604eb37 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -102,6 +102,20 @@
 # If this variable is not set, the default MSI template included with CMake will be used.
 #
 ##end
+##variable
+# CPACK_WIX_EXTRA_SOURCES - Extra WiX source files
+#
+# This variable provides an optional list of extra WiX source files (.wxs)
+# that should be compiled and linked. The full path to source files is required.
+#
+##end
+##variable
+# CPACK_WIX_EXTRA_OBJECTS - Extra WiX object files or libraries
+#
+# This variable provides an optional list of extra WiX object (.wixobj) and/or
+# WiX library (.wixlib) files. The full path to objects and libraries is required.
+#
+##end
 
 #=============================================================================
 # Copyright 2012 Kitware, Inc.
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index cc9dec7..888c29b 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -189,6 +189,8 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
     return false;
     }
 
+  AppendUserSuppliedExtraSources();
+
   std::stringstream objectFiles;
   for(size_t i = 0; i < wixSources.size(); ++i)
     {
@@ -205,9 +207,35 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
     objectFiles << " " << QuotePath(objectFilename);
     }
 
+  AppendUserSuppliedExtraObjects(objectFiles);
+
   return RunLightCommand(objectFiles.str());
 }
 
+void cmCPackWIXGenerator::AppendUserSuppliedExtraSources()
+{
+  const char *cpackWixExtraSources = GetOption("CPACK_WIX_EXTRA_SOURCES");
+  if(!cpackWixExtraSources) return;
+
+  cmSystemTools::ExpandListArgument(cpackWixExtraSources, wixSources);
+}
+
+void cmCPackWIXGenerator::AppendUserSuppliedExtraObjects(std::ostream& stream)
+{
+  const char *cpackWixExtraObjects = GetOption("CPACK_WIX_EXTRA_OBJECTS");
+  if(!cpackWixExtraObjects) return;
+
+  std::vector<std::string> expandedExtraObjects;
+
+  cmSystemTools::ExpandListArgument(
+    cpackWixExtraObjects, expandedExtraObjects);
+
+  for(size_t i = 0; i < expandedExtraObjects.size(); ++i)
+    {
+      stream << " " << QuotePath(expandedExtraObjects[i]);
+    }
+}
+
 bool cmCPackWIXGenerator::CreateWiXVariablesIncludeFile()
 {
   std::string cpackTopLevel;
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
index aaccf9d..d6376cf 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.h
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -68,6 +68,10 @@ private:
 
   bool CreateWiXSourceFiles();
 
+  void AppendUserSuppliedExtraSources();
+
+  void AppendUserSuppliedExtraObjects(std::ostream& stream);
+
   bool CreateLicenseFile();
 
   bool RunWiXCommand(const std::string& command);

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

Summary of changes:
 Modules/CPackWIX.cmake                   |   14 ++++++++++++++
 Source/CMakeVersion.cmake                |    2 +-
 Source/CPack/WiX/cmCPackWIXGenerator.cxx |   28 ++++++++++++++++++++++++++++
 Source/CPack/WiX/cmCPackWIXGenerator.h   |    4 ++++
 4 files changed, 47 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list