Skip to content

MSVC: Restore support for non-incremental linking without 'rc' in PATH

Brad King requested to merge brad.king/cmake:msvc-embed-manifest-direct into master

Since !8245 (merged) we tell the MSVC link tool to embed manifests directly rather than running mt ourselves. However, link expects rc to be in the PATH when embedding manifests. Although that is normally true, some users prepare minimal environments and explicitly specify include and link directories for the Windows SDK. In such cases, rc is not in the PATH and is explicitly specified in CMAKE_RC_COMPILER. Restore support for such cases by explicitly adding the RC location to the end of the PATH.

Fixes: #25047 (closed)
Backport: release

Merge request reports