From 70e7124cc485b943b911b0aae8ae30b4cbce9583 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 30 May 2019 03:45:57 +0800 Subject: [PATCH] [pango/gtk]Fix build error C2001. (#6671) --- ports/gtk/CMakeLists.txt | 5 +++++ ports/gtk/CONTROL | 2 +- ports/pango/CMakeLists.txt | 5 +++++ ports/pango/CONTROL | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/gtk/CMakeLists.txt b/ports/gtk/CMakeLists.txt index 22e30b1a78f7c1..9c265c7e597426 100644 --- a/ports/gtk/CMakeLists.txt +++ b/ports/gtk/CMakeLists.txt @@ -12,6 +12,11 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) set(CAIRO_LIB_SUFFIX d) endif() +if (WIN32) + # Set utf-8 charset to avoid compile error C2001 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") +endif() + # find dependencies # glib find_path(GLIB_INCLUDE_DIR glib.h) diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL index c470f8ac87ae8e..ac0d4764f806dc 100644 --- a/ports/gtk/CONTROL +++ b/ports/gtk/CONTROL @@ -1,4 +1,4 @@ Source: gtk -Version: 3.22.19-2 +Version: 3.22.19-3 Description: Portable library for creating graphical user interfaces. Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index cc21d3eeef0d32..f0e6d85e7e63fc 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -11,6 +11,11 @@ else() configure_file(./config.h.unix ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) endif() +if (WIN32) + # Set utf-8 charset to avoid compile error C2001 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") +endif() + add_definitions(-DHAVE_CONFIG_H) include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 9b176290ba4af9..f58bf18ec57f5a 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.11-3 +Version: 1.40.11-4 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!windows-static)