diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 793e893b26..77bd37b883 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -113,7 +113,7 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile, command << " -ext " << QuotePath(ext); } - if (!cmHasSuffix(sourceFile, this->CPackTopLevel)) { + if (!cmHasPrefix(sourceFile, this->CPackTopLevel)) { command << ' ' << QuotePath(cmStrCat("-I", this->CPackTopLevel)); }