diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-09-28 20:50:15 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2015-09-28 23:18:18 (GMT) |
commit | 9298f56dcedb888ff140b6b1aab90be91162d50f (patch) | |
tree | bb61e7768f1ef64290eddfe9becf001c5968aae9 /Source/CPack/cmCPackGenerator.cxx | |
parent | ecd71c9c1a0735cb84234344387f4138a1853fa5 (diff) | |
download | CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.zip CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.tar.gz CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.tar.bz2 |
CPack: allow packaging of empty directories
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 92a4b2b..def9fc7 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -367,6 +367,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install directory: " << top << std::endl); gl.RecurseOn(); + gl.SetRecurseListDirs(true); if ( !gl.FindFiles(findExpr) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -379,7 +380,11 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( for ( gfit = files.begin(); gfit != files.end(); ++ gfit ) { bool skip = false; - std::string &inFile = *gfit; + std::string inFile = *gfit; + if(cmSystemTools::FileIsDirectory(*gfit)) + { + inFile += '/'; + } for ( regIt= ignoreFilesRegex.begin(); regIt!= ignoreFilesRegex.end(); ++ regIt) @@ -869,6 +874,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( cmsys::Glob glB; findExpr += "/*"; glB.RecurseOn(); + glB.SetRecurseListDirs(true); glB.FindFiles(findExpr); filesBefore = glB.GetFiles(); std::sort(filesBefore.begin(),filesBefore.end()); @@ -908,6 +914,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( { cmsys::Glob glA; glA.RecurseOn(); + glA.SetRecurseListDirs(true); glA.FindFiles(findExpr); std::vector<std::string> filesAfter = glA.GetFiles(); std::sort(filesAfter.begin(),filesAfter.end()); @@ -1074,6 +1081,7 @@ int cmCPackGenerator::DoPackage() std::string findExpr = tempDirectory; findExpr += "/*"; gl.RecurseOn(); + gl.SetRecurseListDirs(true); gl.SetRecurseThroughSymlinks(false); if ( !gl.FindFiles(findExpr) ) { |