SVN makes this fairly easy -- it's pretty much the only redeeming
feature of SVN -- because you can just check out any subdirectory in
the SVN root. You'd set up your tree like:

/trunk/
/trunk/project.pro
/trunk/myLib/
/trunk/appFoo/
/trunk/appBar/

As far as I know, CVS can't do this.

I think git might have support for external modules similar to SVN's
externals; it just downloads another repository as a subdirectory.

I don't know of ANY systems that support conditional downloading, but
I could be wrong.

/s/ Adam

On Mon, Aug 10, 2009 at 4:30 PM, Murphy, Sean M.<[email protected]> wrote:
> Out of curiosity, when you have the setup you've described below, how do you 
> usually set up your CVS/SVN/git repositories?
>
> Right now, we've got it set up where myLib, appFoo, and appBar are 3 
> different CVS modules, with no CVS dependencies between them.  So typically 
> the develop checks out myLib, and then checks out whichever app they want to 
> build next to it, like so:
>
> <parent dir>
>  - myLib dir
>  - appFoo dir
>  - appBar dir
>
> So appFoo.pro and appBar.pro both include ../myLib and link to 
> ../myLib/myLib.so( or dll, dylib as needed by platform)
>
> I'm not sure what's the "preferred" way of setting up the version control 
> repositories under the setup you're describing below...  I wouldn't mind if 
> checking out appFoo or appBar would automatically check out myLib as well, 
> but I don't really want developers to have to check out all 3, there are some 
> developers that only work on one app or the other.
>
> Sean
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Coda Highland
> Sent: Monday, August 10, 2009 3:40 PM
> To: [email protected]
> Subject: Re: [Qt-creator] QtCreator analogue to Visual Studio "solution"
>
> Actually, the subdirs project type is quite a bit more powerful than
> that, but it's poorly documented. Try something more like this in a
> single .pro file:
>
> TEMPLATE = subdirs
> SUBDIRS = sub_lib sub_foo sub_bar
> sub_lib.subdir = myLib
> sub_foo.subdir = appFoo
> sub_foo.depends = sub_lib
> sub_bar.subdir = appBar
> sub_bar.depends = sub_lib
>
> As far as I know, Qt Creator does properly parse this and will present
> all three subprojects as a hierarchical tree; you can build any of the
> three subprojects individually (with dependency tracking, so building
> appFoo will build myLib if needed) or build them all, and you can
> choose which app to run.
>
> /s/ Adam
>
> On Mon, Aug 10, 2009 at 2:09 PM, Murphy, Sean M.<[email protected]> 
> wrote:
>> I posted this on Qt-Interest, but didn't get any responses, so I thought
>> I'd try over here:
>>
>> I'm switching a bunch of Qt apps I've written over from Visual Studio,
>> to Qt Creator and I'm a little stumped on how to handle a Qt shared
>> library with each Qt app with respect to how Qt Creator handles project
>> files.
>>
>> So say I have the following setup:
>>  myLib - library of common classes used by all apps
>>  appFoo - one application based on myLib
>>  appBar - a second application based on myLib
>>
>> Originally I'd have two solutions, appFoo.sln and appBar.sln, each
>> containing two Visual Studio .vcproj files, one project for the
>> application (i.e. appFoo.vcproj), and one for the shared library
>> (myLib.vcproj).  Then, when building the solution it would check
>> dependencies for both projects, building each as necessary.  More
>> importantly, when debugging I could debug both appFoo and myLib.  This
>> debugging feature is what I'm really trying to regain in Qt Creator - to
>> build able to step into the code of both the application and the shared
>> library.
>>
>> I have working .pro files for everything (i.e., myLib.pro, appFoo.pro,
>> appBar.pro) and I can build everything separately, but if I open one of
>> those individual .pro files, I don't see the application AND library
>> files, just one or the other.
>>
>> Should I be creating a "solution" .pro file for each app, and use
>> SUBDIRS?  Something like:
>>
>> appFooSolution.pro:
>>  TEMPLATE = subdirs
>>  SUBDIRS = appFoo myLib
>>
>> appBarSolution.pro:
>>  TEMPLATE = subdirs
>>  SUBDIRS = appBar myLib
>>
>> Sean
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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