From d7003dc734ec3d4072afa59e6fc9bad8d72eb095 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Wed, 24 Oct 2018 13:45:58 +0000 Subject: [PATCH 1/2] 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. --- spectral.pro | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spectral.pro b/spectral.pro index 0536a8fa8..fd1755672 100644 --- a/spectral.pro +++ b/spectral.pro @@ -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 From 7bc4b611d47bffa7f2ba89c7fa64c43a66705d1c Mon Sep 17 00:00:00 2001 From: Black Hat Date: Wed, 24 Oct 2018 22:52:47 +0000 Subject: [PATCH 2/2] Fix comments. --- spectral.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectral.pro b/spectral.pro index fd1755672..669f598cb 100644 --- a/spectral.pro +++ b/spectral.pro @@ -60,7 +60,7 @@ unix:!mac:isEmpty(PREFIX) { PREFIX = /usr/local } unix:!mac:isEmpty(BINDIR) { - message("Install BINDIR not set; using /usr/local. You can change this with 'qmake BINDIR=...'") + message("Install BINDIR not set; using PREFIX/bin. You can change this with 'qmake BINDIR=...'") BINDIR = $$PREFIX/bin } unix:target.path = $$BINDIR