diff options
author | Mathew Sutcliffe <oktal3700@gmail.com> | 2015-11-27 18:03:37 +0000 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-12-01 15:57:16 +0000 |
commit | 8b8e8a33b35ed7307b95172f9602b458d1b71bc8 (patch) | |
tree | 4cc1b3b518ca1d274e4ab7192aedb6f6fe0312d6 /qmake | |
parent | d76be5530a9e8915228db8deeaab3753aebc6367 (diff) |
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 <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
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, QHash<QSt // We assume project filename is [QMAKE_PROJECT_NAME].vcproj QString vcproj = tmp_vcproj.project->first("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; |