From 919a31b2501bd2f68d30b29e54bc8056e08ac6ed Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Sun, 28 Oct 2018 21:53:42 +0000 Subject: [PATCH] Work around a qmake bug that was causing empty directories to be created in the root C:\ directory when using the MSVC solution generator. --- mkspecs/features/copyfiles.pri | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mkspecs/features/copyfiles.pri b/mkspecs/features/copyfiles.pri index d830e116c..871f1de2f 100644 --- a/mkspecs/features/copyfiles.pri +++ b/mkspecs/features/copyfiles.pri @@ -33,3 +33,9 @@ QMAKE_EXTRA_TARGETS += copy_files_cookie !isEmpty($${copy_files.input}) { PRE_TARGETDEPS += $${copy_files_cookie.target} } + +# Disable the extra compiler when the .pro file is being parsed by the MSVC +# project generator to compute dependencies. This works around a bug where +# relative paths were being treated as absolute, leading to qmake creating +# empty directories in the root of the current drive. +contains(TEMPLATE, "vc.*"):!build_pass:QMAKE_EXTRA_COMPILERS -= copy_files