mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Migrate the build system to cmake
This commit is contained in:
75
dependencies/pdf_backend.pri
vendored
75
dependencies/pdf_backend.pri
vendored
@ -1,75 +0,0 @@
|
||||
CONFIG(no_pdf) {
|
||||
DEFINES += "NO_PDF"
|
||||
}
|
||||
|
||||
CONFIG(pdfium) {
|
||||
message(Using pdfium.)
|
||||
DEFINES += "USE_PDFIUM"
|
||||
SOURCES += ../common/pdf_comic.cpp
|
||||
msvc {
|
||||
INCLUDEPATH += $$PWD/pdfium/win/public
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
LIBS += -L$$PWD/pdfium/win/x64 -lpdfium
|
||||
} else:contains(QMAKE_TARGET.arch, arm64): {
|
||||
LIBS += -L$$PWD/pdfium/win/arm64 -lpdfium
|
||||
} else {
|
||||
LIBS += -L$$PWD/pdfium/win/x86 -lpdfium
|
||||
}
|
||||
}
|
||||
unix|mingw {
|
||||
macx {
|
||||
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
||||
INCLUDEPATH += $$PWD/pdfium/macx/include
|
||||
}
|
||||
else:!contains(QT_CONFIG, no-pkg-config):packagesExist(libpdfium) {
|
||||
message(Using system provided installation of libpdfium found by pkg-config.)
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libpdfium
|
||||
} else:exists(/usr/include/pdfium) {
|
||||
message(Using libpdfium found at /usr/lib/pdfium)
|
||||
INCLUDEPATH += /usr/include/pdfium
|
||||
LIBS += -lpdfium
|
||||
} else {
|
||||
error(Could not find libpdfium.)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(pdfkit) {
|
||||
!macx {
|
||||
error (Pdfkit is macOS only)
|
||||
} else {
|
||||
DEFINES += "USE_PDFKIT"
|
||||
OBJECTIVE_SOURCES += ../common/pdf_comic.mm
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(poppler) {
|
||||
msvc {
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
error ("We currently don't ship precompiled poppler libraries for 64 bit builds on Windows")
|
||||
}
|
||||
INCLUDEPATH += $$PWD/poppler/include/qt6
|
||||
LIBS += -L$$PWD/poppler/lib -lpoppler-qt6
|
||||
# Add extra paths for dll dependencies so the executables don't crash when launching
|
||||
# from QtCreator
|
||||
LIBS += -L$$PWD/poppler/bin
|
||||
LIBS += -L$$PWD/poppler/dependencies/bin
|
||||
}
|
||||
if(unix|mingw):!macx {
|
||||
!contains(QT_CONFIG, no-pkg-config):packagesExist(poppler-qt6) {
|
||||
message("Using system provided installation of poppler-qt6 found by pkg-config.")
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += poppler-qt6
|
||||
} else:!macx:exists(/usr/include/poppler/qt6) {
|
||||
message("Using system provided installation of poppler-qt6.")
|
||||
INCLUDEPATH += /usr/include/poppler/qt6
|
||||
LIBS += -lpoppler-qt6
|
||||
} else {
|
||||
error("Could not find poppler-qt6")
|
||||
}
|
||||
}
|
||||
unix:macx {
|
||||
error (Poppler backend is currently not supported on macOS)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user