summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-03-28 22:59:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-03-28 22:59:46 (GMT)
commit99feab3528325833033c32675adc9c2b138cd6ac (patch)
treec36f04e9e5b3e0a3c114f754832699e00cb354a8 /Source/cmLocalGenerator.cxx
parent747e67b7e358d86e7677cd4436a560f545d19dc2 (diff)
downloadCMake-99feab3528325833033c32675adc9c2b138cd6ac.zip
CMake-99feab3528325833033c32675adc9c2b138cd6ac.tar.gz
CMake-99feab3528325833033c32675adc9c2b138cd6ac.tar.bz2
ENH: When installing project, write manifest
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index b5638d5..27f240d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -77,7 +77,16 @@ void cmLocalGenerator::GenerateInstallRules()
}
std::string file = m_Makefile->GetStartOutputDirectory();
+ std::string homedir = m_Makefile->GetHomeOutputDirectory();
+ std::string currdir = m_Makefile->GetCurrentOutputDirectory();
cmSystemTools::ConvertToUnixSlashes(file);
+ cmSystemTools::ConvertToUnixSlashes(homedir);
+ cmSystemTools::ConvertToUnixSlashes(currdir);
+ int toplevel_install = 0;
+ if ( currdir == homedir )
+ {
+ toplevel_install = 1;
+ }
file += "/cmake_install.cmake";
cmGeneratedFileStream tempFile(file.c_str());
std::ostream& fout = tempFile.GetStream();
@@ -254,6 +263,13 @@ void cmLocalGenerator::GenerateInstallRules()
}
fout << std::endl;;
}
+ if ( toplevel_install )
+ {
+ fout << "FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})" << std::endl
+ << " FILE(APPEND \"" << homedir.c_str() << "/install_manifest.txt\" "
+ << "\"${file}\\n\")" << std::endl
+ << "ENDFOREACH(file)" << std::endl;
+ }
}
void cmLocalGenerator::AddInstallRule(std::ostream& fout, const char* dest,