From e7b727fa64f392aa8c4bd9d3e863a1c4630a2890 Mon Sep 17 00:00:00 2001 From: hemirt Date: Sat, 27 May 2017 23:35:58 +0200 Subject: [PATCH] fix MSVC (2015) libcommuni link errors, and use correct warn flag (#44) * use fixed libcommuni submodule * warn flag -W4 should be used for MSVS instead of -Wall, move libcommuni define and include together * define correct warning flags for MSVC and else --- .gitmodules | 2 +- chatterino.pro | 14 +++++++++----- lib/libcommuni | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2ff033dd8..7b983e846 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "lib/libcommuni"] path = lib/libcommuni - url = https://github.com/communi/libcommuni + url = https://github.com/hemirt/libcommuni diff --git a/chatterino.pro b/chatterino.pro index 3c8488cfd..6f6228289 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -9,6 +9,7 @@ CONFIG += communi COMMUNI += core model util CONFIG += c++14 +DEFINES += IRC_NAMESPACE=Communi include(lib/libcommuni/src/src.pri) greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -17,13 +18,16 @@ TARGET = chatterino TEMPLATE = app DEFINES += QT_DEPRECATED_WARNINGS -DEFINES += IRC_NAMESPACE=Communi # Define warning flags for Chatterino -QMAKE_CXXFLAGS_WARN_ON = -Wall -QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function -QMAKE_CXXFLAGS_WARN_ON += -Wno-switch -QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations +win32-msvc* { + QMAKE_CXXFLAGS_WARN_ON = -W4 +} else { + QMAKE_CXXFLAGS_WARN_ON = -Wall + QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function + QMAKE_CXXFLAGS_WARN_ON += -Wno-switch + QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations +} # do not use windows min/max macros win32 { diff --git a/lib/libcommuni b/lib/libcommuni index 1c7ebef19..a31ffb037 160000 --- a/lib/libcommuni +++ b/lib/libcommuni @@ -1 +1 @@ -Subproject commit 1c7ebef19662ba5b09a78e01fc77dd901e302947 +Subproject commit a31ffb037eadac65dba73ad2b2da6dafe31e3bf7