ENH: Allow multiple install directories

This commit is contained in:
Andy Cedilnik 2006-03-15 09:22:51 -05:00
parent 1aecb478d6
commit e48dc06402
1 changed files with 31 additions and 22 deletions

View File

@ -229,10 +229,18 @@ int cmCPackGenericGenerator::InstallProject()
} }
} }
} }
const char* binaryDir = this->GetOption("CPACK_BINARY_DIR"); const char* binaryDirectories = this->GetOption("CPACK_BINARY_DIR");
if ( binaryDir ) if ( binaryDirectories )
{ {
std::string installFile = binaryDir; std::vector<std::string> binaryDirectoriesVector;
cmSystemTools::ExpandListArgument(binaryDirectories,
binaryDirectoriesVector);
std::vector<std::string>::iterator it;
for ( it = binaryDirectoriesVector.begin();
it != binaryDirectoriesVector.end();
++it )
{
std::string installFile = it->c_str();
installFile += "/cmake_install.cmake"; installFile += "/cmake_install.cmake";
cmake cm; cmake cm;
cmGlobalGenerator gg; cmGlobalGenerator gg;
@ -256,6 +264,7 @@ int cmCPackGenericGenerator::InstallProject()
res = 0; res = 0;
} }
} }
}
if ( !movable ) if ( !movable )
{ {
cmSystemTools::PutEnv("DESTDIR="); cmSystemTools::PutEnv("DESTDIR=");