From 599a1cfbcb6f14c6c6a3dff5f3e2b1622509cfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 7 Oct 2016 11:01:01 +0200 Subject: [PATCH] Make sure MinGW knows about "%zu" format specifier --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 817fed723c..3971e7e5d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,6 +261,9 @@ if (NOT DISABLE_OPENGL) if (WIN32) # Curl depends on openssl and ws2 in mingw builds, but is not wired up in pkg-config set(GLLIBS opengl32) + # mingw complains about "%zu" not being a valid format specifier for printf, unless we + # tell it that it is + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") elseif (APPLE) # GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu. find_package(OpenGL REQUIRED)