From 6d116c18eb20237573668902ccd10597320a7ecd Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 10 Apr 2018 09:34:16 +0200 Subject: WIP prefixed install Signed-off-by: Szczepan Zalega --- libnitrokey.pro | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/libnitrokey.pro b/libnitrokey.pro index ea86294..8987031 100644 --- a/libnitrokey.pro +++ b/libnitrokey.pro @@ -79,22 +79,27 @@ INCLUDEPATH = \ #DEFINES = + +isEmpty(PREFIX) { + PREFIX = /usr/local +} + unix:!macx{ # Install rules for QMake (CMake is preffered though) udevrules.path = $$system(pkg-config --variable=udevdir udev) isEmpty(udevrules.path){ - udevrules.path = "/lib/udev/" + udevrules.path = $$PREFIX/lib/udev/ message("Could not detect path for udev rules - setting default: " $$udevrules.path) } - udevrules.path = $$udevrules.path"/rules.d" - udevrules.files = $$PWD/"data/41-nitrokey.rules" + udevrules.path = $$udevrules.path/rules.d + udevrules.files = $$PWD/data/41-nitrokey.rules message ($$udevrules.files) - INSTALLS +=udevrules + INSTALLS += udevrules headers.files = $$HEADERS - headers.path = /usr/local/include/libnitrokey/ + headers.path = $$PREFIX/include/libnitrokey/ INSTALLS += headers - libbin.path = /usr/local/lib - INSTALLS += libbin + target.path = $$PREFIX/lib + INSTALLS += target } -- cgit v1.2.3