mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Buildsystem: add folders for 64bit build and improve dependencies detection.
This commit is contained in:
110
dependencies/pdf_backend.pri
vendored
110
dependencies/pdf_backend.pri
vendored
@ -1,56 +1,68 @@
|
||||
CONFIG(no_pdf) {
|
||||
DEFINES += "NO_PDF"
|
||||
DEFINES += "NO_PDF"
|
||||
}
|
||||
|
||||
CONFIG(pdfium) {
|
||||
DEFINES += "USE_PDFIUM"
|
||||
SOURCES += ../common/pdf_comic.cpp
|
||||
win32 {
|
||||
INCLUDEPATH += $$PWD/pdfium/win/public
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
LIBS += -L$$PWD/pdfium/win/x64 -lpdfium
|
||||
} else {
|
||||
LIBS += -L$$PWD/pdfium/win/x86 -lpdfium
|
||||
}
|
||||
}
|
||||
unix {
|
||||
macx {
|
||||
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
||||
INCLUDEPATH += $$PWD/pdfium/macx/include
|
||||
}
|
||||
!macx {
|
||||
INCLUDEPATH += /usr/include/pdfium
|
||||
LIBS += -L/usr/lib/pdfium -lpdfium -lfreetype
|
||||
}
|
||||
}
|
||||
}
|
||||
DEFINES += "USE_PDFIUM"
|
||||
SOURCES += ../common/pdf_comic.cpp
|
||||
win32 {
|
||||
INCLUDEPATH += $$PWD/pdfium/win/public
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
LIBS += -L$$PWD/pdfium/win/x64 -lpdfium
|
||||
} else {
|
||||
LIBS += -L$$PWD/pdfium/win/x86 -lpdfium
|
||||
}
|
||||
}
|
||||
unix {
|
||||
macx {
|
||||
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
||||
INCLUDEPATH += $$PWD/pdfium/macx/include
|
||||
}
|
||||
!macx:packagesExist(libpdfium) {
|
||||
message(Using system provided installation of libpdfium.)
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libpdfium
|
||||
} else:!macx:exists(/usr/include/pdfium):exists(/usr/lib/libpdfium.so) {
|
||||
message(Using libpdfium found at /usr/lib/pdfium)
|
||||
INCLUDEPATH += /usr/include/pdfium
|
||||
LIBS += -L/usr/lib/pdfium -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) {
|
||||
win32 {
|
||||
contains(QMAKE_TARGET.arch, x86_64): {
|
||||
error ("We currently don't ship precompiled poppler libraries for 64 bit builds")
|
||||
}
|
||||
INCLUDEPATH += $$PWD/poppler/include/qt5
|
||||
LIBS += -L$$PWD/poppler/lib -lpoppler-qt5
|
||||
#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
|
||||
}
|
||||
unix:!macx {
|
||||
INCLUDEPATH += /usr/include/poppler/qt5
|
||||
LIBS += -L/usr/lib -lpoppler-qt5
|
||||
}
|
||||
unix:macx {
|
||||
error (Poppler backend is currently not supported on macOS)
|
||||
}
|
||||
!macx {
|
||||
error (Pdfkit is macOS only)
|
||||
} else {
|
||||
DEFINES += "USE_PDFKIT"
|
||||
OBJECTIVE_SOURCES += ../common/pdf_comic.mm
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG(poppler) {
|
||||
win32 {
|
||||
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/qt5
|
||||
LIBS += -L$$PWD/poppler/lib -lpoppler-qt5
|
||||
# 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
|
||||
}
|
||||
unix:!macx {
|
||||
packagesExist(poppler-qt5) {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += poppler-qt5
|
||||
} else {
|
||||
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