Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt project files and PREFIX variable

I included

PREFIX = /usr/local

inside my project file and then I run

qmake myproject.pro

The makefile doesn't say anything about PREFIX though so I assume that i'm doing something wrong. Any ideas?

like image 972
hytromo Avatar asked Aug 18 '11 11:08

hytromo


2 Answers

PREFIX doesn't mean anything in qmake files. The target for files is done via the target parameter. So if you want to make PREFIX determine the base location, such as /usr/local, you can do do something like this:

isEmpty(PREFIX) {
 PREFIX = /usr/local
}
TARGET = myapp
TARGET.path = $$PREFIX/

The isEmpty(PREFIX) will allow it to be changed during the command line call to qmake, e.g.

qmake PREFIX=/opt
like image 146
Tatu Lahtela Avatar answered Sep 29 '22 13:09

Tatu Lahtela


That is INSTALL_ROOT variable on install, try
make install INSTALL_ROOT="your path"

like image 29
ivan Avatar answered Sep 29 '22 13:09

ivan