CPack/WiX: Add the build directory to IncludeSearchPaths for wix.exe

In commit f2134169f6 (WiX: Add the build directory to IncludeSearchPaths
for candle.exe, 2018-07-06, v3.13.0-rc1~318^2) we implemented this for
WiX v3 with `candle.exe`.  Use the same mechanism for Wix v4 and upwards
for `wix.exe`.
This commit is contained in:
Julian Greilich
2025-05-23 11:04:10 +02:00
committed by Brad King
parent a86eaf98f7
commit 900897b510

View File

@@ -334,8 +334,13 @@ bool cmCPackWIXGenerator::PackageWithWix()
AddCustomFlags("CPACK_WIX_BUILD_EXTRA_FLAGS", command);
bool includeCPackTopLevel = false;
for (std::string const& sourceFilename : this->WixSources) {
command << " -src " << QuotePath(CMakeToWixPath(sourceFilename));
includeCPackTopLevel |= !cmHasPrefix(sourceFilename, this->CPackTopLevel);
}
if (includeCPackTopLevel) {
command << " -i " << QuotePath(this->CPackTopLevel);
}
return RunWiXCommand(command.str());