From 8b8e8a33b35ed7307b95172f9602b458d1b71bc8 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Fri, 27 Nov 2015 18:03:37 +0000 Subject: qmake: Correctly handle shadow build of nested vcsubdirs projects. For some reason, the solution generator was looking for the vcproj files in the source tree. It should look for them in the output tree instead (suggested by Joerg Bornemann). This should handle both in-source and out-of-source builds, and the special-case code for handling out-of-source builds (which had a bug) can be removed. Task-number: QTBUG-49665 Change-Id: I40b5c5907c52ffb074ccb8f297bb5924eacc1cb0 Reviewed-by: Oliver Wolff Reviewed-by: Oswald Buddenhagen Reviewed-by: Andy Shaw Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msvc_vcproj.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 47f99a5c8e..c9f0d92eb9 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -532,31 +532,13 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHashfirst("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION"); - QString vcprojDir = qmake_getpwd(); + QString vcprojDir = Option::output_dir; // If file doesn't exsist, then maybe the users configuration // doesn't allow it to be created. Skip to next... if (!exists(vcprojDir + Option::dir_sep + vcproj)) { - // Try to find the directory which fits relative - // to the output path, which represents the shadow - // path in case we are shadow building - QStringList list = fi.path().split(QLatin1Char('/')); - QString tmpDir = QFileInfo(Option::output).path() + Option::dir_sep; - bool found = false; - for (int i = list.size() - 1; i >= 0; --i) { - QString curr; - for (int j = i; j < list.size(); ++j) - curr += list.at(j) + Option::dir_sep; - if (exists(tmpDir + curr + vcproj)) { - vcprojDir = QDir::cleanPath(tmpDir + curr); - found = true; - break; - } - } - if (!found) { - warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(vcprojDir + Option::dir_sep + vcproj).toLatin1().constData()); - goto nextfile; // # Dirty! - } + warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(vcprojDir + Option::dir_sep + vcproj).toLatin1().constData()); + goto nextfile; // # Dirty! } VcsolutionDepend *newDep = new VcsolutionDepend; -- cgit v1.2.3