Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTCreator Subdirs project does not shadow build properly
In QTCreator 3.0.1 (using qmake/qt 5.2.1) on Windows, 32-bit w/ MinGW.
I have trouble getting subdirs projects to all build within the same shadow build directory.
I have a subdirs project with the following structure:
Where MySubDirsProject.pro reads:
TEMPLATE = subdirs SUBDIRS += \ MyProject\ ../ExternalProject
I have the project set to shadow-build within Directory/build-mysubdirsproject-Debug, and MyProject builds correctly within it... however, ExternalProject creates its Makefile and does all of its build within its source directory (Directory/ExternalProject). It seems to be related to the fact that MySubDirsProject.pro reads "../ExternalProject", so it ends up not just reading the .pro within "../ExternalProject", but also ends up building within ""../ExternalProject", which, relative to the shadow-build directory, just so happens to be the source directory. How do i get the external project to build within the same shadow-build directory? Qt reference pretty explicitly says not to modify the OUT_PWD variable.
AFAIK, you would need to put that project inside yours. Not unlike a git submodule
@SGaist So it's actually impossible to attempt to do what I'm doing? That seems odd, as it seems like it should be very common practice to have some set of "common" libraries that many projects rely upon. We're using SVN for content management, so it would be very bizarre to have to checkout those common libraries, copy them into my directory, and then if any modifications are made, copy them back out to the checkout directory and commit...
Then rather use svn externals
Doing so you ensure that when checking out one of your project that uses that common set of libraries you get your project in a known working state.
The other way would be to handle that set the same way you would any dev library on your system i.e. build, install and then use these libraries. However you loose the benefit of the checkout at a known working state.
@SGaist Ah the svn externals seems like exactly what we need. Thank you, i was unaware of this functionality in svn.
You're welcome !
Svn allows some interesting things like the use of properties that can simplify some handling for e.g. your files header.