aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoratkawa7 <atkawa7@yahoo.com>2017-07-28 16:54:57 -0700
committeratkawa7 <atkawa7@yahoo.com>2017-07-28 16:54:57 -0700
commitb46bb2f913f553c75af115e7d1106797f491913f (patch)
tree9287cff6f0ffe7e40179f94029ec9614dbf7281a
parent148a6e0a5b205e8e83a95d48a996d8d07b50a9cd (diff)
downloadvcpkg-b46bb2f913f553c75af115e7d1106797f491913f.tar.gz
vcpkg-b46bb2f913f553c75af115e7d1106797f491913f.zip
[vcpkg] add a patch for empty string literal
-rw-r--r--ports/libkml/patch_empty_literal_on_vc.patch13
-rw-r--r--ports/libkml/portfile.cmake7
2 files changed, 20 insertions, 0 deletions
diff --git a/ports/libkml/patch_empty_literal_on_vc.patch b/ports/libkml/patch_empty_literal_on_vc.patch
new file mode 100644
index 000000000..8a3581a05
--- /dev/null
+++ b/ports/libkml/patch_empty_literal_on_vc.patch
@@ -0,0 +1,13 @@
+diff --git a/src/kml/base/file_win32.cc b/src/kml/base/file_win32.cc
+index c46e099..28ccb36 100644
+--- a/src/kml/base/file_win32.cc
++++ b/src/kml/base/file_win32.cc
+@@ -42,7 +42,7 @@ namespace kmlbase {
+ // Internal to the win32 file class. We need a conversion from string to
+ // LPCWSTR.
+ static std::wstring Str2Wstr(const string& str) {
+- std::wstring wstr(str.length(), L'');
++ std::wstring wstr(str.length(), L' ');
+ std::copy(str.begin(), str.end(), wstr.begin());
+ return wstr;
+ }
diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake
index 8aaa96957..5d2f014f8 100644
--- a/ports/libkml/portfile.cmake
+++ b/ports/libkml/portfile.cmake
@@ -7,6 +7,13 @@ vcpkg_from_github(
HEAD_REF master
)
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/patch_empty_literal_on_vc.patch"
+)
+
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
)