cmake: Fix CMAKE_HOST_SYSTEM_VERSION when built for MinGW

Due to #23244 our application manifest is not automatically embedded when built with MinGW tools. Embed it via an explicit resource file.

Also add <trustInfo> to the manifest because MinGW tooling does not add it automatically as MSVC tooling does.

Original Description

MinGW: embed application manifest into cmake.exe

This fixes incorrect CMAKE_SYSTEM_VERSUION when CMake is built with MinWGW toolchain.

Current solution only works with MSVC toolchain due to #23244, so special handling is needed for MinGW.

<trustInfo> tag is needed in cmake.version.manifest because only MSVC toolchain adds it automatically, with MinWGW it needs to be in the manifest.

Fixes: #27152 (closed)
Issue: #23244
Topic-rename: mingw-host-system-version

Edited by Brad King

Merge request reports

Loading