qt5base-lts/qmake
Chris Gilbert ae52bba5d4 Fix msvc project dependencies as specificed by .depends
Previously, the full path to the qmake project file was specified as the
key for projGuids when inserting the project GUID into this hash table.

The only place that items are inserted into projGuids is in
VcprojGenerator::collectDependencies at:

	projGuids.insert(val.first, newDep->target);

In this case, val.first contains the full path for the given project being
processed at this point. (e.g.: c:\testproject\testproject.pro)

Further in sln/vcproj generation, projGuids is queried with the contents
of <TARGET>.depends so that users may specify another qmake project as a
dependency for a given target.

This occurs in two places, in two ways:

1) In VcprojGenerator::collectDependencies() at:
	QString depend = dep.toQString();
	if (!projGuids[depend].isEmpty()) {
	...

In this case QString depend contains whatever is put into <TARGET>.depends.
Typically this is the plain name of the project you depend on.
(e.g.: testproj)

2) In VcprojGenerator::writeSubDirs(QTextStream &t) by proxy of
   extraSubdirs which is a QStringList of the project depends should the
   mapping in case 1 fail.

This case works much like the above case, attempting to use each
QString entry of the extraSubdirs list as a key in projGuids.

If either of the above two attempts are successful, the msvc solution is
configured in a way that creates a project dependency, ensuring correct
compilation order and other related behavior.

The fix here stores the target project (e.g.: testproject) as opposed to the
full project path, as that is what is expected in the <TARGET>.depends
statements contained in the qmake project.

Change-Id: Iee05661a64d7a3e4467c5ade48d801fbbfe981b5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Chris Gilbert <cgilbert@knaldtech.com>
2013-10-29 19:59:17 +01:00
..
doc Mention that the c++11 CONFIG flag sometimes has no effect. 2013-10-09 13:52:58 +02:00
generators Fix msvc project dependencies as specificed by .depends 2013-10-29 19:59:17 +01:00
library qmake: Expose qmake arguments as QMAKE_ARGS 2013-10-24 20:20:59 +02:00
cachekeys.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
main.cpp make sure that installed meta files are always postprocessed 2013-10-11 21:04:04 +02:00
Makefile.unix Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00
Makefile.win32 Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00
meta.cpp Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
meta.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
option.cpp qmake: Expose qmake arguments as QMAKE_ARGS 2013-10-24 20:20:59 +02:00
option.h qmake: Expose qmake arguments as QMAKE_ARGS 2013-10-24 20:20:59 +02:00
project.cpp implement simple VFS to support caching during project parsing 2013-08-07 13:58:41 +02:00
project.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
property.cpp introduce /src qmake property variants 2013-06-12 16:27:21 +02:00
property.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmake_pch.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmake-docs.pro move qmake docs into qtbase 2013-06-17 15:41:55 +02:00
qmake.pri Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00
qmake.pro Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00