From 278925edb7e10c98a32ffdf94eb8ac42c20cca43 Mon Sep 17 00:00:00 2001 From: seb314 Date: Tue, 19 May 2020 00:53:09 +0200 Subject: [PATCH 1/2] optional INSTALL_PATH qmake flag (on unix) I packaged Jamulus for nix/nixos and it would be neat if there was an option to specify a path at which to install the binary. I'm not really familiar with qmake -- is this a good way to achieve this? (nixpkgs pull request: https://github.com/NixOS/nixpkgs/pull/87914) --- Jamulus.pro | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jamulus.pro b/Jamulus.pro index 164258c3..9f0a431c 100755 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -301,6 +301,12 @@ DISTFILES_OBOE += libs/oboe/AUTHORS \ android/AndroidManifest.xml \ android/sound.h \ android/sound.cpp + + # could this also be done for all platforms? + defined(INSTALL_PATH, var) { + INSTALLS += target + target.path = $$INSTALL_PATH + } } RCC_DIR = src/res From 660e07ef6cde2ed8975231da0460819eea76a9ca Mon Sep 17 00:00:00 2001 From: seb314 Date: Wed, 20 May 2020 21:40:37 +0200 Subject: [PATCH 2/2] use jtojnar's suggestion, add default install target with PREFIX/BINDIR --- Jamulus.pro | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 9f0a431c..50a57f6d 100755 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -302,11 +302,15 @@ DISTFILES_OBOE += libs/oboe/AUTHORS \ android/sound.h \ android/sound.cpp - # could this also be done for all platforms? - defined(INSTALL_PATH, var) { - INSTALLS += target - target.path = $$INSTALL_PATH + isEmpty(PREFIX) { + PREFIX = /usr/local } + isEmpty(BINDIR) { + BINDIR = bin + } + BINDIR = $$absolute_path($$BINDIR, $$PREFIX) + INSTALLS += target + target.path = $$BINDIR } RCC_DIR = src/res