summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2021-02-17 20:59:20 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2021-02-17 20:59:20 (GMT)
commit00459e2b44fe1ee1a508f562bdf05acbea99c181 (patch)
treec8b73a5f0e43428fe6c764f197222654fdde8ea9 /CMakeLists.txt
parent9c66e698466ed29a493df8746b767558684205b2 (diff)
downloadNinja-00459e2b44fe1ee1a508f562bdf05acbea99c181.zip
Ninja-00459e2b44fe1ee1a508f562bdf05acbea99c181.tar.gz
Ninja-00459e2b44fe1ee1a508f562bdf05acbea99c181.tar.bz2
Use UTF-8 on Windows 10 Version 1903, fix #1195
Allows Ninja to use descriptions, filenames and environment variables with characters outside of the ANSI codepage on Windows. Build manifests are now UTF-8 by default (this change needs to be emphasized in the release notes). WriteConsoleOutput doesn't support UTF-8, but it's deprecated on newer Windows 10 versions anyway (or as Microsoft likes to put it: "no longer a part of our ecosystem roadmap"). We'll use the VT100 sequence just as we do on Linux and macOS. https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page https://docs.microsoft.com/en-us/windows/console/writeconsoleoutput https://docs.microsoft.com/de-de/windows/console/console-virtual-terminal-sequences
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39348c9..89bccb2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,6 +137,10 @@ endif()
add_executable(ninja src/ninja.cc)
target_link_libraries(ninja PRIVATE libninja libninja-re2c)
+if(WIN32)
+ target_sources(ninja PRIVATE windows/ninja.manifest)
+endif()
+
# Adds browse mode into the ninja binary if it's supported by the host platform.
if(platform_supports_ninja_browse)
# Inlines src/browse.py into the browse_py.h header, so that it can be included