[cmake-commits] david.cole committed cmCPackCygwinBinaryGenerator.cxx 1.2 1.3 cmCPackCygwinBinaryGenerator.h 1.2 1.3 cmCPackCygwinSourceGenerator.cxx 1.3 1.4 cmCPackCygwinSourceGenerator.h 1.2 1.3 cmCPackDebGenerator.cxx 1.16 1.17 cmCPackDebGenerator.h 1.2 1.3 cmCPackGenericGenerator.cxx 1.47 1.48 cmCPackGenericGenerator.h 1.19 1.20 cmCPackOSXX11Generator.cxx 1.4 1.5 cmCPackOSXX11Generator.h 1.3 1.4 cmCPackPackageMakerGenerator.cxx 1.19 1.20 cmCPackPackageMakerGenerator.h 1.8 1.9 cmCPackRPMGenerator.cxx 1.5 1.6 cmCPackRPMGenerator.h 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 31 08:50:19 EDT 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv23514/Source/CPack

Modified Files:
	cmCPackCygwinBinaryGenerator.cxx 
	cmCPackCygwinBinaryGenerator.h 
	cmCPackCygwinSourceGenerator.cxx 
	cmCPackCygwinSourceGenerator.h cmCPackDebGenerator.cxx 
	cmCPackDebGenerator.h cmCPackGenericGenerator.cxx 
	cmCPackGenericGenerator.h cmCPackOSXX11Generator.cxx 
	cmCPackOSXX11Generator.h cmCPackPackageMakerGenerator.cxx 
	cmCPackPackageMakerGenerator.h cmCPackRPMGenerator.cxx 
	cmCPackRPMGenerator.h 
Log Message:
ENH: Add CPACK_SET_DESTDIR handling to enable packaging of installed files in absolute locations. With this setting on, cpack will set the DESTDIR env var when building the package so that files end up in their intended locations. Default behavior is not to set DESTDIR for backwards compatibility. Helps address issue #4993 and issue #5257. Also, remove unused CPACK_USE_DESTDIR variable. ENH: Add variable CPACK_PACKAGING_INSTALL_PREFIX to allow overriding the CPack GetPackagingInstallPrefix from a project's CMakeLists file if necessary. Could be used to remove the annoying /usr prefix still used by default in the Mac PackageMaker generator.


Index: cmCPackOSXX11Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackOSXX11Generator.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmCPackOSXX11Generator.h	13 Feb 2007 19:12:56 -0000	1.3
+++ cmCPackOSXX11Generator.h	31 Oct 2007 12:50:17 -0000	1.4
@@ -40,7 +40,7 @@
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
-  virtual const char* GetInstallPrefix();
+  virtual const char* GetPackagingInstallPrefix();
   virtual const char* GetOutputExtension() { return ".dmg"; }
 
   //bool CopyCreateResourceFile(const char* name, const char* dir);

Index: cmCPackGenericGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenericGenerator.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cmCPackGenericGenerator.h	24 Jul 2007 16:52:37 -0000	1.19
+++ cmCPackGenericGenerator.h	31 Oct 2007 12:50:17 -0000	1.20
@@ -18,7 +18,6 @@
 #ifndef cmCPackGenericGenerator_h
 #define cmCPackGenericGenerator_h
 
-
 #include "cmObject.h"
 
 #define cmCPackTypeMacro(class, superclass) \
@@ -102,8 +101,7 @@
   virtual int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
   virtual const char* GetInstallPath();
-  virtual const char* GetInstallPrefix() { return "/"; }
-  virtual const char* GetTemporaryInstallDirectoryPostfix() { return ""; }
+  virtual const char* GetPackagingInstallPrefix();
 
   virtual std::string FindTemplate(const char* name);
   virtual bool ConfigureFile(const char* inName, const char* outName,
@@ -114,13 +112,13 @@
 
   //! Run install commands if specified
   virtual int InstallProjectViaInstallCommands(
-    bool movable, const char* tempInstallDirectory);
+    bool setDestDir, const char* tempInstallDirectory);
   virtual int InstallProjectViaInstallScript(
-    bool movable, const char* tempInstallDirectory);
+    bool setDestDir, const char* tempInstallDirectory);
   virtual int InstallProjectViaInstalledDirectories(
-    bool movable, const char* tempInstallDirectory);
+    bool setDestDir, const char* tempInstallDirectory);
   virtual int InstallProjectViaInstallCMakeProjects(
-    bool movable, const char* tempInstallDirectory);
+    bool setDestDir, const char* tempInstallDirectory);
 
   bool GeneratorVerbose;
   std::string Name;

Index: cmCPackOSXX11Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackOSXX11Generator.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmCPackOSXX11Generator.cxx	22 Feb 2007 14:44:27 -0000	1.4
+++ cmCPackOSXX11Generator.cxx	31 Oct 2007 12:50:17 -0000	1.5
@@ -178,8 +178,6 @@
   this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", 
                           pkgPath.c_str());
 
-  
-
   return this->Superclass::InitializeInternal();
 }
 
@@ -228,6 +226,7 @@
 }
 */
 
+//----------------------------------------------------------------------
 bool cmCPackOSXX11Generator::CopyResourcePlistFile(const char* name,
   const char* dir, const char* outputFileName /* = 0 */,
   bool copyOnly /* = false */)
@@ -259,7 +258,7 @@
 }
 
 //----------------------------------------------------------------------
-const char* cmCPackOSXX11Generator::GetInstallPrefix()
+const char* cmCPackOSXX11Generator::GetPackagingInstallPrefix()
 {
   this->InstallPrefix = "/";
   this->InstallPrefix += this->GetOption("CPACK_PACKAGE_FILE_NAME");

Index: cmCPackRPMGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackRPMGenerator.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmCPackRPMGenerator.h	17 Aug 2007 13:33:29 -0000	1.3
+++ cmCPackRPMGenerator.h	31 Oct 2007 12:50:17 -0000	1.4
@@ -41,10 +41,10 @@
   virtual ~cmCPackRPMGenerator();
 
 protected:
+  virtual int InitializeInternal();
   virtual int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
   virtual const char* GetOutputExtension() { return ".rpm"; }
-  virtual const char* GetInstallPrefix() { return "/usr"; }
 
 };
 

Index: cmCPackCygwinBinaryGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinBinaryGenerator.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackCygwinBinaryGenerator.cxx	2 Feb 2007 19:40:25 -0000	1.2
+++ cmCPackCygwinBinaryGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.3
@@ -41,6 +41,7 @@
 //----------------------------------------------------------------------
 int cmCPackCygwinBinaryGenerator::InitializeInternal()
 {
+  this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
   this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0");
   std::vector<std::string> path;
   std::string pkgPath = cmSystemTools::FindProgram("bzip2", path, false);

Index: cmCPackCygwinSourceGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinSourceGenerator.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cmCPackCygwinSourceGenerator.cxx	2 Feb 2007 21:52:20 -0000	1.3
+++ cmCPackCygwinSourceGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.4
@@ -166,7 +166,7 @@
   return 1;
 }
 
-const char* cmCPackCygwinSourceGenerator::GetInstallPrefix()
+const char* cmCPackCygwinSourceGenerator::GetPackagingInstallPrefix()
 {
   this->InstallPrefix = "/";
   this->InstallPrefix += this->GetOption("CPACK_PACKAGE_FILE_NAME");

Index: cmCPackPackageMakerGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackPackageMakerGenerator.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cmCPackPackageMakerGenerator.h	2 Feb 2007 19:40:26 -0000	1.8
+++ cmCPackPackageMakerGenerator.h	31 Oct 2007 12:50:17 -0000	1.9
@@ -44,7 +44,6 @@
     const std::vector<std::string>& files);
   virtual const char* GetOutputExtension() { return ".dmg"; }
   virtual const char* GetOutputPostfix() { return "darwin"; }
-  virtual const char* GetInstallPrefix() { return "/usr"; }
 
   bool CopyCreateResourceFile(const char* name);
   bool CopyResourcePlistFile(const char* name);

Index: cmCPackGenericGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenericGenerator.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- cmCPackGenericGenerator.cxx	3 Aug 2007 19:26:30 -0000	1.47
+++ cmCPackGenericGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.48
@@ -61,6 +61,7 @@
 int cmCPackGenericGenerator::PrepareNames()
 {
   this->SetOption("CPACK_GENERATOR", this->Name.c_str());
+
   std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
   tempDirectory += "/_CPack_Packages/";
   const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG");
@@ -80,7 +81,14 @@
   destFile += "/" + outName;
 
   std::string outFile = topDirectory + "/" + outName;
-  std::string installPrefix = tempDirectory + this->GetInstallPrefix();
+
+  bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"));
+  std::string installPrefix = tempDirectory;
+  if (!setDestDir)
+    {
+    installPrefix += this->GetPackagingInstallPrefix();
+    }
+
   this->SetOptionIfNotSet("CPACK_TOPLEVEL_DIRECTORY", topDirectory.c_str());
   this->SetOptionIfNotSet("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str());
   this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_NAME", outName.c_str());
@@ -147,8 +155,6 @@
   this->CleanTemporaryDirectory();
   std::string tempInstallDirectoryWithPostfix
     = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
-  tempInstallDirectoryWithPostfix
-    += this->GetTemporaryInstallDirectoryPostfix();
   const char* tempInstallDirectory = tempInstallDirectoryWithPostfix.c_str();
   int res = 1;
   if ( !cmsys::SystemTools::MakeDirectory(tempInstallDirectory))
@@ -160,23 +166,23 @@
     return 0;
     }
 
-  bool movable = true;
-  if ( movable )
-    {
-    // Make sure there is no destdir
-    cmSystemTools::PutEnv("DESTDIR=");
-    }
-  else
+  bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"));
+  if ( setDestDir )
     {
     std::string destDir = "DESTDIR=";
     destDir += tempInstallDirectory;
     cmSystemTools::PutEnv(destDir.c_str());
     }
+  else
+    {
+    // Make sure there is no destdir
+    cmSystemTools::PutEnv("DESTDIR=");
+    }
 
   // If the CPackConfig file sets CPACK_INSTALL_COMMANDS then run them
   // as listed
   if ( !this->InstallProjectViaInstallCommands(
-      movable, tempInstallDirectory) )
+      setDestDir, tempInstallDirectory) )
     {
     return 0;
     }
@@ -184,7 +190,7 @@
   // If the CPackConfig file sets CPACK_INSTALL_SCRIPT then run them
   // as listed
   if ( !this->InstallProjectViaInstallScript(
-      movable, tempInstallDirectory) )
+      setDestDir, tempInstallDirectory) )
     {
     return 0;
     }
@@ -193,7 +199,7 @@
   // then glob it and copy it to CPACK_TEMPORARY_DIRECTORY
   // This is used in Source packageing
   if ( !this->InstallProjectViaInstalledDirectories(
-      movable, tempInstallDirectory) )
+      setDestDir, tempInstallDirectory) )
     {
     return 0;
     }
@@ -202,12 +208,12 @@
   // If the project is a CMAKE project then run pre-install
   // and then read the cmake_install script to run it
   if ( !this->InstallProjectViaInstallCMakeProjects(
-      movable, tempInstallDirectory) )
+      setDestDir, tempInstallDirectory) )
     {
     return 0;
     }
 
-  if ( !movable )
+  if ( setDestDir )
     {
     cmSystemTools::PutEnv("DESTDIR=");
     }
@@ -217,9 +223,9 @@
 
 //----------------------------------------------------------------------
 int cmCPackGenericGenerator::InstallProjectViaInstallCommands(
-  bool movable, const char* tempInstallDirectory)
+  bool setDestDir, const char* tempInstallDirectory)
 {
-  (void)movable;
+  (void)setDestDir;
   (void)tempInstallDirectory;
   const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS");
   if ( installCommands && *installCommands )
@@ -261,9 +267,9 @@
 
 //----------------------------------------------------------------------
 int cmCPackGenericGenerator::InstallProjectViaInstalledDirectories(
-  bool movable, const char* tempInstallDirectory)
+  bool setDestDir, const char* tempInstallDirectory)
 {
-  (void)movable;
+  (void)setDestDir;
   (void)tempInstallDirectory;
   std::vector<cmsys::RegularExpression> ignoreFilesRegex;
   const char* cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES");
@@ -299,7 +305,6 @@
       }
     std::vector<std::string>::iterator it;
     const char* tempDir = tempInstallDirectory;
-// this->GetOption("CPACK_TEMPORARY_DIRECTORY");
     for ( it = installDirectoriesVector.begin();
       it != installDirectoriesVector.end();
       ++it )
@@ -362,7 +367,7 @@
 
 //----------------------------------------------------------------------
 int cmCPackGenericGenerator::InstallProjectViaInstallScript(
-  bool movable, const char* tempInstallDirectory)
+  bool setDestDir, const char* tempInstallDirectory)
 {
   const char* cmakeScripts
     = this->GetOption("CPACK_INSTALL_SCRIPT");
@@ -384,10 +389,37 @@
 
       cmCPackLogger(cmCPackLog::LOG_OUTPUT,
         "- Install script: " << installScript << std::endl);
-      if ( movable )
+
+      if ( setDestDir )
+        {
+        // For DESTDIR based packaging, use the *project* CMAKE_INSTALL_PREFIX
+        // underneath the tempInstallDirectory. The value of the project's
+        // CMAKE_INSTALL_PREFIX is sent in here as the value of the
+        // CPACK_INSTALL_PREFIX variable.
+        std::string dir = tempInstallDirectory;
+        if (this->GetOption("CPACK_INSTALL_PREFIX"))
+          {
+          dir += this->GetOption("CPACK_INSTALL_PREFIX");
+          }
+        this->SetOption("CMAKE_INSTALL_PREFIX", dir.c_str());
+
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Using DESTDIR + CPACK_INSTALL_PREFIX... (this->SetOption)"
+          << std::endl);
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" << std::endl);
+        }
+      else
         {
         this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory);
+
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Using non-DESTDIR install... (this->SetOption)" << std::endl);
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Setting CMAKE_INSTALL_PREFIX to '" << tempInstallDirectory
+          << "'" << std::endl);
         }
+
       this->SetOptionIfNotSet("CMAKE_CURRENT_BINARY_DIR",
         tempInstallDirectory);
       this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR",
@@ -404,7 +436,7 @@
 
 //----------------------------------------------------------------------
 int cmCPackGenericGenerator::InstallProjectViaInstallCMakeProjects(
-  bool movable, const char* tempInstallDirectory)
+  bool setDestDir, const char* tempInstallDirectory)
 {
   const char* cmakeProjects
     = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS");
@@ -517,10 +549,37 @@
         {
         realInstallDirectory += installSubDirectory;
         }
-      if ( movable )
+
+      if ( setDestDir )
+        {
+        // For DESTDIR based packaging, use the *project* CMAKE_INSTALL_PREFIX
+        // underneath the tempInstallDirectory. The value of the project's
+        // CMAKE_INSTALL_PREFIX is sent in here as the value of the
+        // CPACK_INSTALL_PREFIX variable.
+        std::string dir = tempInstallDirectory;
+        if (this->GetOption("CPACK_INSTALL_PREFIX"))
+          {
+          dir += this->GetOption("CPACK_INSTALL_PREFIX");
+          }
+        mf->AddDefinition("CMAKE_INSTALL_PREFIX", dir.c_str());
+
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Using DESTDIR + CPACK_INSTALL_PREFIX... (mf->AddDefinition)"
+          << std::endl);
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" << std::endl);
+        }
+      else
         {
         mf->AddDefinition("CMAKE_INSTALL_PREFIX", tempInstallDirectory);
+
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Using non-DESTDIR install... (mf->AddDefinition)" << std::endl);
+        cmCPackLogger(cmCPackLog::LOG_DEBUG,
+          "- Setting CMAKE_INSTALL_PREFIX to '" << tempInstallDirectory
+          << "'" << std::endl);
         }
+
       if ( buildConfig && *buildConfig )
         {
         mf->AddDefinition("BUILD_TYPE", buildConfig);
@@ -701,6 +760,11 @@
     return 0;
     }
 
+  // If a generator subclass did not already set this option in its
+  // InitializeInternal implementation, and the project did not already set
+  // it, the default value should be:
+  this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/");
+
   return result;
 }
 
@@ -928,6 +992,15 @@
 }
 
 //----------------------------------------------------------------------
+const char* cmCPackGenericGenerator::GetPackagingInstallPrefix()
+{
+  cmCPackLogger(cmCPackLog::LOG_DEBUG, "GetPackagingInstallPrefix: '"
+    << this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'" << std::endl);
+
+  return this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
+}
+
+//----------------------------------------------------------------------
 std::string cmCPackGenericGenerator::FindTemplate(const char* name)
 {
   cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
@@ -960,8 +1033,6 @@
 {
   std::string tempInstallDirectoryWithPostfix
     = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
-  tempInstallDirectoryWithPostfix
-    += this->GetTemporaryInstallDirectoryPostfix();
   const char* tempInstallDirectory = tempInstallDirectoryWithPostfix.c_str();
   if(cmsys::SystemTools::FileExists(tempInstallDirectory))
     {

Index: cmCPackRPMGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackRPMGenerator.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cmCPackRPMGenerator.cxx	31 Oct 2007 03:02:43 -0000	1.5
+++ cmCPackRPMGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.6
@@ -28,6 +28,14 @@
 }
 
 //----------------------------------------------------------------------
+int cmCPackRPMGenerator::InitializeInternal()
+{
+  this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
+
+  return this->Superclass::InitializeInternal();
+}
+
+//----------------------------------------------------------------------
 int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/,
   const char* /*toplevel*/,
   const std::vector<std::string>& /*files*/)

Index: cmCPackPackageMakerGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackPackageMakerGenerator.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cmCPackPackageMakerGenerator.cxx	30 Oct 2006 16:22:47 -0000	1.19
+++ cmCPackPackageMakerGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.20
@@ -141,6 +141,7 @@
 {
   cmCPackLogger(cmCPackLog::LOG_DEBUG,
     "cmCPackPackageMakerGenerator::Initialize()" << std::endl);
+  this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
   std::vector<std::string> path;
   std::string pkgPath
     = "/Developer/Applications/Utilities/PackageMaker.app/Contents";

Index: cmCPackCygwinSourceGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinSourceGenerator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackCygwinSourceGenerator.h	2 Feb 2007 19:40:25 -0000	1.2
+++ cmCPackCygwinSourceGenerator.h	31 Oct 2007 12:50:17 -0000	1.3
@@ -34,7 +34,7 @@
   cmCPackCygwinSourceGenerator();
   virtual ~cmCPackCygwinSourceGenerator();
 protected:
-  const char* GetInstallPrefix();
+  const char* GetPackagingInstallPrefix();
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);

Index: cmCPackCygwinBinaryGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackCygwinBinaryGenerator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackCygwinBinaryGenerator.h	2 Feb 2007 19:40:25 -0000	1.2
+++ cmCPackCygwinBinaryGenerator.h	31 Oct 2007 12:50:17 -0000	1.3
@@ -34,7 +34,6 @@
   cmCPackCygwinBinaryGenerator();
   virtual ~cmCPackCygwinBinaryGenerator();
 protected:
-  virtual const char* GetInstallPrefix() { return "/usr"; }
   virtual int InitializeInternal();
   int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);

Index: cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cmCPackDebGenerator.cxx	25 Oct 2007 17:26:54 -0000	1.16
+++ cmCPackDebGenerator.cxx	31 Oct 2007 12:50:17 -0000	1.17
@@ -43,6 +43,14 @@
 }
 
 //----------------------------------------------------------------------
+int cmCPackDebGenerator::InitializeInternal()
+{
+  this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr");
+
+  return this->Superclass::InitializeInternal();
+}
+
+//----------------------------------------------------------------------
 int cmCPackDebGenerator::CompressFiles(const char* outFileName,
   const char* toplevel,
   const std::vector<std::string>& files)

Index: cmCPackDebGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmCPackDebGenerator.h	14 Aug 2007 12:40:40 -0000	1.2
+++ cmCPackDebGenerator.h	31 Oct 2007 12:50:17 -0000	1.3
@@ -37,10 +37,10 @@
   virtual ~cmCPackDebGenerator();
 
 protected:
+  virtual int InitializeInternal();
   virtual int CompressFiles(const char* outFileName, const char* toplevel,
     const std::vector<std::string>& files);
   virtual const char* GetOutputExtension() { return ".deb"; }
-  virtual const char* GetInstallPrefix() { return "/usr"; }
 
 };
 



More information about the Cmake-commits mailing list