aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/glib/use-libiconv-on-windows.patch
blob: e9a7ac21c0734d5a78087b0427cb6ad8c2701ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/glib/gconvert.c b/glib/gconvert.c
index 829fe38de..e01ad8884 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -33,7 +33,8 @@
 
 #ifdef G_OS_WIN32
 #include <windows.h>
-#include "win_iconv.c"
+#define USE_LIBICONV_GNU
+#include <iconv.h>
 #endif
 
 #include "gconvert.h"
diff --git a/meson.build b/meson.build
index d465253af..34ce69e4d 100644
--- a/meson.build
+++ b/meson.build
@@ -2038,7 +2038,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
 if host_system == 'windows'
   # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
   # any external library for it
-  libiconv = []
+  libiconv = [cc.find_library('iconv')]
+  found_iconv = true
 else
   libiconv = dependency('iconv')
 endif