Unix: Fix regression in translation install target

The introduction of CONFIG+= lrelease introduced a regression in the
installation of translation files on systems using make install targets.

This is fixed by replacing the old translation targets with the target
supplied by lrelease.

Fixes #349
This commit is contained in:
Felix Kauselmann
2022-10-31 13:19:50 +01:00
parent 4c2b6da884
commit a35cb979e4
4 changed files with 21 additions and 45 deletions

View File

@ -214,28 +214,16 @@ win32 {
$(COPY) $$shell_path($${SOURCE_QM_DIR}) $$shell_path($${DEPLOYMENT_OUT_QM_DIR})
} else {
LRELEASE_DIR = ../release/languages/
QM_FILES_INSTALL_PATH = $$DATADIR/yacreader/languages
}
unix:!macx {
# set install prefix if it's empty
isEmpty(PREFIX) {
PREFIX = /usr
}
isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}
isEmpty(LIBDIR) {
LIBDIR = $$PREFIX/lib
}
isEmpty(DATADIR) {
DATADIR = $$PREFIX/share
}
DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\""
#MAKE INSTALL
INSTALLS += bin docs icon desktop translation manpage
INSTALLS += bin docs icon desktop manpage
bin.path = $$BINDIR
isEmpty(DESTDIR) {
@ -256,9 +244,6 @@ icon.files = ../YACReader.svg
desktop.path = $$DATADIR/applications
desktop.files = ../YACReader.desktop
translation.path = $$DATADIR/yacreader/languages
translation.files = ../release/languages/yacreader_*
manpage.path = $$DATADIR/man/man1
manpage.files = ../YACReader.1