diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2013-12-05 05:17:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-09 15:29:43 (GMT) |
commit | 0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc (patch) | |
tree | 512d1177b107bba94ddd7b016530f0c6a140b531 /Source/CPack/WiX/cmCPackWIXGenerator.cxx | |
parent | ce598cc838c717132a122a97c5e21b99f11fe23b (diff) | |
download | CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.zip CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.gz CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.bz2 |
Windows: Use wide-character system APIs
Make CMake compile with -DUNICODE. Make it possible for the 8 bit
encoding to eventually be UTF-8 instead ANSI.
Diffstat (limited to 'Source/CPack/WiX/cmCPackWIXGenerator.cxx')
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 91701c2..1b9b20a 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -23,6 +23,7 @@ #include <cmsys/SystemTools.hxx> #include <cmsys/Directory.hxx> +#include <cmsys/Encoding.hxx> #include <rpc.h> // for GUID generation @@ -954,11 +955,12 @@ std::string cmCPackWIXGenerator::GenerateGUID() UUID guid; UuidCreate(&guid); - unsigned char *tmp = 0; - UuidToString(&guid, &tmp); + unsigned short *tmp = 0; + UuidToStringW(&guid, &tmp); - std::string result(reinterpret_cast<char*>(tmp)); - RpcStringFree(&tmp); + std::string result = + cmsys::Encoding::ToNarrow(reinterpret_cast<wchar_t*>(tmp)); + RpcStringFreeW(&tmp); return cmSystemTools::UpperCase(result); } |