diff options
author | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2018-07-06 10:52:04 (GMT) |
---|---|---|
committer | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2018-07-12 06:48:33 (GMT) |
commit | f2134169f61e12354c79cd818758d34257116b1c (patch) | |
tree | f9aa10db577ce6e9d2515d9209d2cac1ec410b98 /Source/CPack | |
parent | 05cd8311ab52cf1e1ca40701c092602fe51cfbe4 (diff) | |
download | CMake-f2134169f61e12354c79cd818758d34257116b1c.zip CMake-f2134169f61e12354c79cd818758d34257116b1c.tar.gz CMake-f2134169f61e12354c79cd818758d34257116b1c.tar.bz2 |
WiX: Add the build directory to IncludeSearchPaths for candle.exe
CPack creates cpack_variables.wxi in the build directory. In the WiX
template it can be used by <?include "cpack_variables.wxi"?> because
the template is configured into main.wxs in the build directory.
Because the extra source files are in the source directory it was necessary to use
<?include "$(sys.CURRENTDIR)_CPack_Packages\win32\WIX\cpack_variables.wxi"?>.
This requires knowledge about the build directory structure and
is avoided by this change by adding the build directory to the IncludeSearchPaths.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 382b189..398ebd3 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -100,6 +100,10 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile, command << " -ext " << QuotePath(ext); } + if (sourceFile.rfind(this->CPackTopLevel, 0) != 0) { + command << " " << QuotePath("-I" + this->CPackTopLevel); + } + AddCustomFlags("CPACK_WIX_CANDLE_EXTRA_FLAGS", command); command << " " << QuotePath(sourceFile); |