From 755ac40c044d3189d413fe2eb20cd2f832c1baa3 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 16 Apr 2019 15:42:20 +0200 Subject: [PATCH] Correctly set include path in CFLAGS and CXXFLAGS It appears that setting `INCLUDEPATH` in qmake break things. Because qmake add the include path using `-isystem`. We don't need to extract include path and define from PKGCONFIG_CFLAGS. Updating `CFLAGS` and `CXXFLAGS` is enough. No need for complex things. Fix #90 Fix kiwix/kiwix-build#260 --- kiwix-desktop.pro | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/kiwix-desktop.pro b/kiwix-desktop.pro index ae15b7d..821e59d 100644 --- a/kiwix-desktop.pro +++ b/kiwix-desktop.pro @@ -136,17 +136,6 @@ unix { PKGCONFIG_CFLAGS = $$system(pkg-config --cflags $$PKGCONFIG_OPTION kiwix) -PKGCONFIG_INCLUDEPATH = $$find(PKGCONFIG_CFLAGS, ^-I.*) -PKGCONFIG_INCLUDEPATH ~= s/^-I(.*)/\\1/g - -PKGCONFIG_DEFINES = $$find(PKGCONFIG_CFLAGS, ^-D.*) -PKGCONFIG_DEFINES ~= s/^-D(.*)/\\1/g - -PKGCONFIG_CFLAGS ~= s/^-[ID].*//g - -INCLUDEPATH *= $$PKGCONFIG_INCLUDEPATH -DEFINES *= $$PKGCONFIG_DEFINES - QMAKE_CXXFLAGS += $$PKGCONFIG_CFLAGS QMAKE_CFLAGS += $$PKGCONFIG_CFLAGS