[cmake-developers] Help wanted on the "component" code in CPack

Eric Noulard eric.noulard at gmail.com
Sun Aug 1 20:18:54 EDT 2010


HI there,

I'm trying to implement:

http://public.kitware.com/Bug/view.php?id=10736

with an application to add component support to "Archive" generator.

I did cross a bit of code I do not understand in
cmCPackGenerator.cxx::DoPackage

in which we seem to "prepare" the components, but this is doing nothing but
putting ALL files in the same component...

  // For component installations, determine which files go into which
  // components.
  if (!this->Components.empty())
    {
    std::vector<std::string>::const_iterator it;
    for ( it = files.begin(); it != files.end(); ++ it )
      {
      std::string fileN = cmSystemTools::RelativePath(tempDirectory,
                                                      it->c_str());

      // Determine which component we are in.
      std::string componentName = fileN.substr(0, fileN.find('/'));

      // Strip off the component part of the path.
      fileN = fileN.substr(fileN.find('/')+1, std::string::npos);

      // Add this file to the list of files for the component.
      this->Components[componentName].Files.push_back(fileN);
      }
    }

is this code supposed to work iff
CPACK_INCLUDE_TOPLEVEL_DIRECTORY is set to 0 ?

(which is not the case for Archive Generator...)
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list