<table><tr><td style="">sitter created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5217" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When using a toolchain file one often would want to set a<br />
CMAKE_FIND_ROOT_PATH to "re-root" lookups into a staging area to prevent<br />
native host artifcats from being found. This in particular is usually the<br />
case for lib/include/package finders as one would want the target<br />
systems build artifacts rather than the hosts.<br />
find_file() unfortunately draws its re-rooting rule from<br />
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE, which as mentioned would usually be<br />
set not to look in the actual host paths to avoid picking up wrong includes<br />
which would also prevent find_file to work here.</p>
<p>In the case of the coreaddonstooling it makes sense to look in the host<br />
though. For one the lookup only runs when CROSS_COMPILING is set (which<br />
usually is the case for toolchains), AND one explicitly has to specify a<br />
HOST_TOOLING path. So in a way by specifying that one is already opting<br />
out of whatever rooting rules one has set elsewhere as setting that var<br />
is a clear indication that we have *specific* host tooling and we want<br />
to use that rather than anything else.<br />
As a result NO_CMAKE_FIND_ROOT_PATH is the way to go when looking for stuff<br />
under a KF5_HOST_TOOLING conditional.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5217" rel="noreferrer">https://phabricator.kde.org/D5217</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>KF5CoreAddonsConfig.cmake.in</div></div></div><br /><div><strong>To: </strong>sitter, apol, mpyne<br /><strong>Cc: </strong>Frameworks<br /></div>