CPackWiX: Work around RelativePath() returning an empty string for the root

This commit is contained in:
Nils Gladitz 2014-10-03 15:10:51 +02:00
parent 0e0cb710d0
commit fb009f00ae
1 changed files with 5 additions and 0 deletions

View File

@ -850,6 +850,11 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
std::string relativeDirectoryPath =
cmSystemTools::RelativePath(toplevel.c_str(), topdir.c_str());
if(relativeDirectoryPath.empty())
{
relativeDirectoryPath = ".";
}
cmInstalledFile const* directoryInstalledFile =
this->GetInstalledFile(relativeDirectoryPath);