mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
MSVC: Fix manifest resource encoding
When using the Ninja or Makefile generator with MSVC on Windows we invoke the resource compiler (`rc.exe`) to compile a manifest resource. CMake generates the file with UTF-8 encoding so we need to add a pragma to inform the resource compiler.
This commit is contained in:
@@ -1775,6 +1775,8 @@ int cmVSLink::LinkIncremental()
|
|||||||
if (!fout) {
|
if (!fout) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
// Insert a pragma statement to specify utf-8 encoding.
|
||||||
|
fout << "#pragma code_page(65001)\n";
|
||||||
fout << this->Type
|
fout << this->Type
|
||||||
<< " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ "
|
<< " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ "
|
||||||
"24 /* RT_MANIFEST */ \""
|
"24 /* RT_MANIFEST */ \""
|
||||||
|
|||||||
Reference in New Issue
Block a user