From ee29874543933aa63f31ecabcf8bcda4d90eb5df Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Jul 2020 16:07:45 +0300 Subject: [PATCH] Default prefix must be defined before first use. Added new preprocessor macros value BINDIR. #56 --- common.pri | 9 +++++---- src/app/tape/tape.pro | 2 +- src/app/valentina/valentina.pro | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common.pri b/common.pri index 98a103b99..ed9c98177 100644 --- a/common.pri +++ b/common.pri @@ -20,14 +20,18 @@ unix{ VCOPY = $$QMAKE_COPY -u } + # Default prefix. Use for creation install path. + DEFAULT_PREFIX = /usr + # Prefix for binary file. isEmpty(PREFIX){ PREFIX = $$DEFAULT_PREFIX } + BINDIR = $$PREFIX/bin DATADIR = $$PREFIX/share PKGDATADIR = $$DATADIR/valentina - DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" + DEFINES += BINDIR=\\\"$$BINDIR\\\" DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" } win32{ @@ -319,9 +323,6 @@ defineReplace(FindLatestTagDistance){ } } -# Default prefix. Use for creation install path. -DEFAULT_PREFIX = /usr - # In debug mode on Unix system we use all usefull for us compilers keys for checking errors. # Also trying make all possible for speed up build time. unix { diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 9575a2a5f..47da84de5 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -193,7 +193,7 @@ include(../translations.pri) unix{ !macx{ # Path to bin file after installation - target.path = $$PREFIX/bin + target.path = $$BINDIR rcc_diagrams.path = $$PKGDATADIR rcc_diagrams.files = $${OUT_PWD}/$${DESTDIR}/diagrams.rcc diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index dd7c297be..1b43de106 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -144,9 +144,9 @@ include(../translations.pri) unix{ !macx{ # Path to bin file after installation - target.path = $$PREFIX/bin + target.path = $$BINDIR - tape.path = $$PREFIX/bin + tape.path = $$BINDIR tape.files += $${OUT_PWD}/../tape/$${DESTDIR}/tape # .desktop file