qmake installs project in /opt instead of /usr/local

26 views Asked by At

I'm on Ubuntu 22.04. I have a project which I build from the command line:

qmake -qt=qt5
make
sudo make install

I expect it to install it in /usr/local/bin, but it puts it in /opt/QFtpServer/bin/:

/usr/lib/qt5/bin/qmake -install qinstall -exe QFtpServer /opt/QFtpServer/bin/QFtpServer

I tried PREFIX=/usr/local sudo make install but it didn't affect it at all.

I then tried sudo make install INSTALL_ROOT='/usr/local' it has effect but it still installed it in the wrong path - /usr/local/opt/QFtpServer/bin/QFtpServer instead of /usr/local/bin/QFtpServer.

/usr/lib/qt5/bin/qmake -install qinstall -exe QFtpServer /usr/local/opt/QFtpServer/bin/QFtpServer

So how do I get qmake to actually install the thing where I want it to? My ideal solution is an environment variable that can be set at the time of sudo make install - this is the most flexible. I hope I don't have to edit .pri files or set something at the time I first build the project.

Hopefully something as simple as setting the install root is configurable at the time of actual installation, without requiring a rebuild.

0

There are 0 answers