mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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. Fixes: #27152 Issue: #23244
This commit is contained in:
@@ -967,7 +967,11 @@ if(WIN32)
|
||||
|
||||
# Add a manifest file to executables on Windows to allow for
|
||||
# GetVersion to work properly on Windows 8 and above.
|
||||
target_sources(ManifestLib INTERFACE cmake.version.manifest)
|
||||
if(MSVC)
|
||||
target_sources(ManifestLib INTERFACE cmake.version.manifest)
|
||||
else()
|
||||
target_sources(ManifestLib INTERFACE cmake.version.manifest.rc)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -20,4 +20,11 @@
|
||||
<ws2:longPathAware>true</ws2:longPathAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#include <winuser.h>
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "cmake.version.manifest"
|
||||
Reference in New Issue
Block a user