[Qt-creator] Shadow Build Folder Location in QMake
Danny Price
deepblue842 at googlemail.com
Fri May 14 12:59:33 CEST 2010
On Fri, May 14, 2010 at 11:49 AM, Robert Caldecott <
robert.caldecott at gmail.com> wrote:
> Hi, long time no post.
>
> I have installed the Qt Creator 2.0 beta and have decided to try
> shadow builds (as they are enabled by default). The problem I have is
> that some of my qmake .pro files are assuming that targets will end up
> in ./debug, ./release, etc. which no longer works. For example, the
> following snippet will set a dependency:
>
> CONFIG(debug, debug|release):OUTDIR = debug
> else:OUTDIR = release
> PRE_TARGETDEPS += ../ProjectName/$${OUTDIR}/someLib.a
>
> This will now fail as the shadow build path is different.
>
Hi had the exact same problem and it was a royal pain because:
a) all my projects encode their deps via relative paths like this.
b) i don't keep pro.user files in source control and so i get this problem
everytime i do a clean checkout due to Creator setting up new shadow builds.
>
> So, what I want to do is simple - I want to be able to get the shadow
> build location from my .pro file. I've tried every qmake variable I
> can think of but none of them help. DESTDIR is always blank for
> example. The closest I've found is OUT_PWD but I really need one that
> specifies a folder a level about this.
>
Shadow-builds appear to be a Creator specific feature so qmake won't help.
> Before I give up on what seems to be a useful feature can anyone offer
> me some advice? I store all my dependency information in the main
> .pro files and want to avoid anything that requires a user to set (so
> changing .pro.user is out of the question.)
>
> QMAKE_SHADOW_BUILD_DIR would be great obviously. :)
>
Store your related projects within a single SUBDIR project. That way,
Creator will create a single shadow build directory for the SUBDIR and all
it's projects. Your relative paths should then work again :)
I've done this and it seems to work fine.
Session-only projects and shadow builds do not mix.
> Thanks in advance.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100514/30b00164/attachment.html
More information about the Qt-creator-old
mailing list