[Qt-interest] QMake equivalent to ./configure --prefix
Sean Harmer
sean.harmer at maps-technology.com
Thu Feb 4 09:54:35 CET 2010
Hi,
On Wednesday 03 Feb 2010 16:02:10 Merwin wrote:
> Hello,
>
> I'm developping a console application, with plugins support. I've got a
> main.pro project file with a subdir template. I'm looking for a way to
> specify an 'install directory', that means that all the subdirs projet
> (in fact, plugins) will be installed in this directory.
>
> For example:
>
> qmake dir=/home/me/myapp/
> make
> make install
>
> And make install will install all files in /home/me/myapp.
> And the plugins (which are SUBDIRS project), would install in
> /home/me/myapp/plugins/.
> I didn't found an easy way to do this, is there one?
You need to set the target path for each target somehow and then add the
target to the INSTALLS variable. For e.g. we use:
target.path = $$(MAPSROOT)/lib
INSTALLS += target
to make sure that our libs get installed to a prefix specified by the MAPSROOT
environment variable. We just make sure that this is set to the correct path
before running qmake.
If you have many subdirs that all need the same partial configuration then put
the common stuff into a .pri file (project include file) in the parent dir and
get each subdir's pro file to include it with:
include( ../common-stuff.pri )
Hope this helps,
Sean
More information about the Qt-interest-old
mailing list