[Qt-interest] QMake equivalent to ./configure --prefix

Lorenzo Masini lorenxo86 at gmail.com
Thu Feb 4 15:51:31 CET 2010


Il giorno mer, 03/02/2010 alle 17.02 +0100, Merwin ha scritto: 
> 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?

As you said you can pass something like 

$ qmake PREFIX=/usr

then in your .pro file you have to write:

target.path = $${PREFIX}}/wheredoyouwant
INSTALLS += target

An alternative could be to use QConf (http://delta.affinix.com/qconf ),
which creates a configure script.

Cheers
Lorenzo







More information about the Qt-interest-old mailing list