Fix builds with quazip 1.X

Sigh. quazip changed the lib name, include locations, etc. from version 1.
Some distributions only have 0.9. Some only  1.x and so some packages break,
so they simply patch it when building the package.

Luckily, nothing we use from quazip is affected from an API perspective.

So detect if there is quazip1, then use pkg-config to link that, else do it like before.
This commit is contained in:
Albert S. 2022-06-21 22:10:21 +02:00
والد a820183477
کامیت 759d2a7924
4فایلهای تغییر یافته به همراه23 افزوده شده و 3 حذف شده

مشاهده پرونده

@ -37,6 +37,12 @@ else:unix: LIBS += -L$$OUT_PWD/../shared/ -lshared
LIBS += -luchardet -lpoppler-qt5 -lquazip5 LIBS += -luchardet -lpoppler-qt5 -lquazip5
packagesExist(quazip1-qt5) {
PKGCONFIG += quazip1-qt5
CONFIG += link_pkgconfig
LIBS -= -lquazip5
}
INCLUDEPATH += $$PWD/../shared INCLUDEPATH += $$PWD/../shared
DEPENDPATH += $$PWD/../shared DEPENDPATH += $$PWD/../shared

مشاهده پرونده

@ -7,7 +7,11 @@
QT += core concurrent gui network QT += core concurrent gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17 CONFIG += c++17
TARGET = looqs-gui TARGET = looqs-gui
TEMPLATE = app TEMPLATE = app
@ -69,6 +73,12 @@ else:unix: LIBS += -L$$OUT_PWD/../shared/ -lshared
LIBS += -luchardet -lpoppler-qt5 -lquazip5 LIBS += -luchardet -lpoppler-qt5 -lquazip5
packagesExist(quazip1-qt5) {
PKGCONFIG += quazip1-qt5
CONFIG += link_pkgconfig
LIBS -= -lquazip5
}
INCLUDEPATH += $$PWD/../shared INCLUDEPATH += $$PWD/../shared
DEPENDPATH += $$PWD/../shared DEPENDPATH += $$PWD/../shared

مشاهده پرونده

@ -1,5 +1,5 @@
#include <quazip5/quazip.h> #include <quazip.h>
#include <quazip5/quazipfile.h> #include <quazipfile.h>
#include "odtprocessor.h" #include "odtprocessor.h"
#include "tagstripperprocessor.h" #include "tagstripperprocessor.h"

مشاهده پرونده

@ -16,7 +16,11 @@ CONFIG += c++17
INCLUDEPATH += $$PWD/../sandbox/exile.h/ INCLUDEPATH += $$PWD/../sandbox/exile.h/
INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5 INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5
# Dirty, we only need the includes here but well this magic works, so...
packagesExist(quazip1-qt5) {
PKGCONFIG += quazip1-qt5
CONFIG += link_pkgconfig
}
# The following define makes your compiler emit warnings if you use # The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings # any feature of Qt which has been marked as deprecated (the exact warnings