CPack/WiX: Restore condition for passing build directory to candle search path

Refactoring in commit 48adc29721 (replace "std::string::find(x) == 0"
with cmHasPrefix(), 2020-03-20, v3.18.0-rc1~488^2~7) accidentally
changed `std::string::rfind(x, 0) != 0` to `!cmHasSuffix()` instead of
`!cmHasPrefix()`.

This is currently not an big issue, but leads to the build directory
being included even when no source file outside the build directory is
used in the project.
This commit is contained in:
Julian Greilich
2025-05-23 10:51:23 +02:00
committed by Brad King
parent fc9e9d1196
commit a86eaf98f7

View File

@@ -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));
}