From d855b67d10b493afbae7cb5756ecf0d1b6270722 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sun, 22 Mar 2015 03:57:45 +0100 Subject: [PATCH] Fix config.h issues in 3rdparty caused by new INCLUDEPATH handling in Qt 5.4.1. This commit fixes an issue caused by a new behavior in Qt 5.4.1 that causes PWD to be included in the default INCLUDEPATH on Windows with the nmake/VS generators. This new behavior was implemented in the following Qt commit: qtbase/a90bb5b89a - centralize/unify/sanitize INCLUDEPATH "enrichment") https://github.com/qtproject/qtbase/commit/a90bb5b89a09490a1795064133f6d8ce33b6874e This is a problem because our codecs in 3rdparty use two distinct config.h files: one for Win32, and one for everything else. The Win32 variant lives in the Win32 subdirectory of the build root. The build root is the directory that will be added automatically by the new Qt behavior. Typically, the build root has a build suffix, for example 'speex-build'. The regular config.h - the one for everything else but Win32 - lives in the buildroot itself. This new Qt behavior caused the wrong config.h file to be included on Windows. Since the build root is now in the INCLUDEPATH, the config.h file that lives in the build root now takes precedence over the one in the Win32 directory. To restore the old behavior for the codec builds, we use Qt config option called 'no_include_pwd'. That explicitly tells qmake to not include the PWD in the INCLUDEPATH. This restores the previous behavior on Windows. The 'no_include_pwd' config option has been around in Qt for a while. It was not introduced with the aforementioned change to Qt, so it doesn't break backwards compatibility for us. --- 3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro | 1 + 3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro | 1 + 3rdparty/opus-build/opus-build.pro | 1 + 3rdparty/speex-build/speex-build.pro | 1 + 4 files changed, 4 insertions(+) diff --git a/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro b/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro index ca5d2d558..33a6b77bd 100644 --- a/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro +++ b/3rdparty/celt-0.11.0-build/celt-0.11.0-build.pro @@ -15,6 +15,7 @@ CONFIG -= qt CONFIG += debug_and_release CONFIG -= warn_on CONFIG += warn_off +CONFIG += no_include_pwd VPATH = ../$$SOURCEDIR/libcelt TARGET = celt0 RC_FILE = celt-0.11.0.rc diff --git a/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro b/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro index 563cba055..4001eaf22 100644 --- a/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro +++ b/3rdparty/celt-0.7.0-build/celt-0.7.0-build.pro @@ -15,6 +15,7 @@ CONFIG -= qt CONFIG += debug_and_release CONFIG -= warn_on CONFIG += warn_off +CONFIG += no_include_pwd VPATH = ../$$SOURCEDIR/libcelt TARGET = celt0 RC_FILE = celt-0.7.0.rc diff --git a/3rdparty/opus-build/opus-build.pro b/3rdparty/opus-build/opus-build.pro index 3472a9a71..6e485304f 100644 --- a/3rdparty/opus-build/opus-build.pro +++ b/3rdparty/opus-build/opus-build.pro @@ -17,6 +17,7 @@ CONFIG -= qt CONFIG += debug_and_release #CONFIG -= warn_on #CONFIG += warn_off +CONFIG += no_include_pwd VPATH = ../$$SOURCEDIR TARGET = opus DEFINES += HAVE_CONFIG_H diff --git a/3rdparty/speex-build/speex-build.pro b/3rdparty/speex-build/speex-build.pro index a4be6ce28..18d9a520e 100644 --- a/3rdparty/speex-build/speex-build.pro +++ b/3rdparty/speex-build/speex-build.pro @@ -27,6 +27,7 @@ CONFIG -= qt CONFIG += debug_and_release CONFIG -= warn_on CONFIG += warn_off +CONFIG += no_include_pwd VPATH = ../speex-src/libspeex TARGET = speex DEFINES += NDEBUG HAVE_CONFIG_H