mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-24 03:39:45 +00:00
fix for uwp builds
This commit is contained in:
parent
1edc7e0d3b
commit
8ee0ec1699
25
ports/libiconv/0003-Fix-uwp.patch
Normal file
25
ports/libiconv/0003-Fix-uwp.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c
|
||||
index 3aceb42..dadd95a 100644
|
||||
--- a/libcharset/lib/localcharset.c
|
||||
+++ b/libcharset/lib/localcharset.c
|
||||
@@ -455,7 +455,10 @@ locale_charset (void)
|
||||
# endif
|
||||
|
||||
#elif defined WIN32_NATIVE
|
||||
-
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
+ // GetACP() not available to UWP apps
|
||||
+ codeset = NULL;
|
||||
+#else
|
||||
static char buf[2 + 10 + 1];
|
||||
|
||||
/* Woe32 has a function returning the locale's codepage as a number:
|
||||
@@ -467,7 +470,7 @@ locale_charset (void)
|
||||
encoding is the best bet. */
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
-
|
||||
+#endif
|
||||
#elif defined OS2
|
||||
|
||||
const char *locale;
|
@ -55,6 +55,8 @@ list(APPEND Libiconv_headers ${Libiconv_BINARY_DIR}/localcharset.h)
|
||||
#
|
||||
set(libname libiconv)
|
||||
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
configure_file(
|
||||
${Libiconv_SOURCE_DIR}/include/iconv.h.build.in
|
||||
${Libiconv_BINARY_DIR}/iconv.h
|
||||
|
@ -14,6 +14,7 @@ vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Add-export-definitions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Config-for-MSVC.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Fix-uwp.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
Loading…
Reference in New Issue
Block a user