[Qt-interest] .pro files
BRM
bm_witness at yahoo.com
Mon Jul 11 22:53:27 CEST 2011
----- Original Message ----
> From: Sean Harmer <sean.harmer at maps-technology.com>
> On Monday 11 July 2011 10:35:46 Graham Labdon wrote:
> > I have a .pro file that contains all my headers, sources and forms for my
> > application. My application is now growing and hence the .pro file is
> > becoming large and unmanageable. The source code is organised into folders
> > and it would seem to make sense if each source folder had its own .pro file
> > that a 'main' .pro file calls. I am uncertain if this is possible (or
> > desirable).
> > Could anyone tell me if this is a good idea and if so how do I go about
> > implementing this
>
> Add a .pri file in each subdir that ists the source, headers etc for that dir
> and then include those into your .pro file.
>
Just for reference - you'll want to use $$PWD as a prefix for each file, and
even though they're separated into different directories, the filenames will
still need to be unique as they will all be built with output to the same
release/debug/build directory.
So for example:
HEADERS += $$PWD/myObject.h
SOURCES += $$PWD/myObject.cpp
$0.02
Ben
More information about the Qt-interest-old
mailing list