mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 15:35:03 -04:00
Move pdf backend integration logic to seperate .pri file
This commit is contained in:
49
dependencies/pdf_backend.pri
vendored
Normal file
49
dependencies/pdf_backend.pri
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
CONFIG(no_pdf) {
|
||||
DEFINES += "NO_PDF"
|
||||
}
|
||||
|
||||
CONFIG(pdfium) {
|
||||
DEFINES += "USE_PDFIUM"
|
||||
SOURCES += ../common/pdf_comic.cpp
|
||||
win32 {
|
||||
INCLUDEPATH += ../dependencies/pdfium/public
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
LIBS += -L$$PWD/../dependencies/pdfium/x64 -lpdfium
|
||||
} else {
|
||||
LIBS += -L$$PWD/../dependencies/pdfium/x86 -lpdfium
|
||||
}
|
||||
}
|
||||
unix {
|
||||
macx {
|
||||
LIBS += -L$$PWD/../dependencies/pdfium/macx/bin -lpdfium
|
||||
INCLUDEPATH += $$PWD/../dependencies/pdfium/macx/include
|
||||
}
|
||||
!macx {
|
||||
INCLUDEPATH += /usr/include/pdfium
|
||||
LIBS += -L/usr/lib/pdfium -lpdfium -lfreetype
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(pdfkit) {
|
||||
!macx {
|
||||
error (Pdfkit is macOS only)
|
||||
} else {
|
||||
DEFINES += "USE_PDFKIT"
|
||||
OBJECTIVE_SOURCES += ../common/pdf_comic.mm
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(poppler) {
|
||||
win32 {
|
||||
LIBS += -Lpoppler/lib -lpoppler-qt5
|
||||
INCLUDEPATH += poppler/include/qt5
|
||||
}
|
||||
unix:!macx {
|
||||
INCLUDEPATH += /usr/include/poppler/qt5
|
||||
LIBS += -L/usr/lib -lpoppler-qt5
|
||||
}
|
||||
unix:macx {
|
||||
error (Poppler backend is currently not supported on macOS)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user