diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index c988b59701..92b1e80b8a 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1984,7 +1984,7 @@ cmFileListGeneratorBase* cmFileListGeneratorBase::SetNext( bool cmFileListGeneratorBase::Consider(std::string const& fullPath, cmFileList& listing) { - if (!cmSystemTools::FileIsDirectory(fullPath)) { + if (!fullPath.empty() && !cmSystemTools::FileIsDirectory(fullPath)) { return false; } if (this->Next) {