Using a shadow build breaks my .pro file on Mac because my project uses SUBDIRS 
to build some frameworks, and then builds the final .app. In the .app I include 
those frameworks as private frameworks. The rule to add those frameworks looks 
something like this:

PRIVATE_FRAMEWORKS.files = ../Framework1/Framework1.framework 
../Framework2/Framework2.framework

In this case, the ../ is interpreted by the build as relative to the source 
directory, not the shadow build directory. But those frameworks are created in 
the shadow build directory. What is the proper method to specify those paths so 
they will be relative to the build directory whether it is a shadow build or 
not?

Perhaps cases like this are the reason for the negative reactions I have seen 
for shadow builds. Shadow builds can indeed break projects if the projects are 
not defined carefully enough. And until shadow builds became so prominent in Qt 
Creator, it was not apparent that anything was amiss in the .pro file. I like 
the idea of shadow builds, but some good documentation would be helpful. The 
only mention of shadow builds I can find is in the Windows CE section. And it 
only discusses doing shadow builds of Qt by running configure in each shadow 
build directory. I can find nothing on how to properly configure my .pro file 
for shadow builds of my product.

Thanks,
John

On Jun 29, 2010, at 12:01 AM, John Vilburn wrote:

> On Jun 28, 2010, at 11:13 PM, Thorbjørn Lindeijer wrote:
> 
>> That Qt Creator allows you to set the directory in which to do the build 
>> should not be a surprise, nor should it be surprising that this is 
>> stored in a .user file, since its up to each developer.
>> 
>> Note that this is quite different from setting OBJECTS_DIR, UI_DIR, etc. 
>> so there is no duplication here. The main purpose of the shadow builds 
>> is to build against different Qt configurations.
> 
> Is the assumption being made that OBJECTS_DIR, UI_DIR, and others should 
> always be relative paths? If that assumption is true, then it seems to me 
> that specifying a shadow build directory should not break the .pro file. 
> Perhaps the difficulty with shadow builds arises when developers put absolute 
> paths in OBJECTS_DIR and such, because then the OBJECTS_DIR would override 
> the shadow build dir, rather than work with it. Am I right? If I am missing 
> something, please explain in more detail how setting the shadow build dir "is 
> quite different from setting OBJECTS_DIR, UI_DIR, etc."
> 
> I do find it an annoyance that when loading a project into Qt Creator for the 
> first time, that I can find no way to NOT specify a shadow build. I have to 
> go into the project settings after it is loaded and uncheck the shadow build 
> option. Did I miss something there?
> 
> John
> 
> 
> 
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to