Add support for BINDIR environmental variable

cross-compile environments usually puts binary in a specified directory,
e.g. /usr/x86_64/bin, while installing other files in a shared
directory, like /usr/share. Therefore supporting BINDIR is required.
This commit is contained in:
Danilo Spinella 2018-10-24 13:45:58 +00:00
parent e19e3b8ff9
commit d7003dc734
1 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,11 @@ unix:!mac:isEmpty(PREFIX) {
message("Install PREFIX not set; using /usr/local. You can change this with 'qmake PREFIX=...'")
PREFIX = /usr/local
}
unix:target.path = $$PREFIX/bin
unix:!mac:isEmpty(BINDIR) {
message("Install BINDIR not set; using /usr/local. You can change this with 'qmake BINDIR=...'")
BINDIR = $$PREFIX/bin
}
unix:target.path = $$BINDIR
win32:target.path = $$PREFIX
!isEmpty(target.path): INSTALLS += target