mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Improve qmake checks for pdf backends (poppler, pdfium, pkg-config fallback)
This commit is contained in:
parent
fd3d54449e
commit
49f670fe96
15
dependencies/pdf_backend.pri
vendored
15
dependencies/pdf_backend.pri
vendored
@ -18,11 +18,11 @@ CONFIG(pdfium) {
|
|||||||
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
||||||
INCLUDEPATH += $$PWD/pdfium/macx/include
|
INCLUDEPATH += $$PWD/pdfium/macx/include
|
||||||
}
|
}
|
||||||
else:!macx:packagesExist(libpdfium) {
|
else:!contains(QT_CONFIG, no-pkg-config):packagesExist(libpdfium) {
|
||||||
message(Using system provided installation of libpdfium.)
|
message(Using system provided installation of libpdfium found by pkg-config.)
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += libpdfium
|
PKGCONFIG += libpdfium
|
||||||
} else:!macx:exists(/usr/include/pdfium):exists(/usr/lib/libpdfium.so) {
|
} else:exists(/usr/include/pdfium):exists(/usr/lib/libpdfium.so) {
|
||||||
message(Using libpdfium found at /usr/lib/pdfium)
|
message(Using libpdfium found at /usr/lib/pdfium)
|
||||||
INCLUDEPATH += /usr/include/pdfium
|
INCLUDEPATH += /usr/include/pdfium
|
||||||
LIBS += -L/usr/lib/pdfium -lpdfium
|
LIBS += -L/usr/lib/pdfium -lpdfium
|
||||||
@ -54,13 +54,18 @@ CONFIG(poppler) {
|
|||||||
LIBS += -L$$PWD/poppler/dependencies/bin
|
LIBS += -L$$PWD/poppler/dependencies/bin
|
||||||
}
|
}
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
packagesExist(poppler-qt5) {
|
!contains(QT_CONFIG, no-pkg-config):packagesExist(poppler-qt5) {
|
||||||
|
message("Using system provided installation of poppler-qt5 found by pkg-config.")
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += poppler-qt5
|
PKGCONFIG += poppler-qt5
|
||||||
} else {
|
} else:!macx:exists(/usr/include/poppler/qt5):exists(/usr/lib/libpoppler-qt5) {
|
||||||
|
message("Using system provided installation of poppler-qt5.")
|
||||||
INCLUDEPATH += /usr/include/poppler/qt5
|
INCLUDEPATH += /usr/include/poppler/qt5
|
||||||
LIBS += -L/usr/lib -lpoppler-qt5
|
LIBS += -L/usr/lib -lpoppler-qt5
|
||||||
|
} else {
|
||||||
|
error("Could not find poppler-qt5")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
unix:macx {
|
unix:macx {
|
||||||
error (Poppler backend is currently not supported on macOS)
|
error (Poppler backend is currently not supported on macOS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user