Fix compilation with pdfium on windows

This commit is contained in:
Felix Kauselmann 2017-02-05 16:41:11 +01:00
parent a005846098
commit d5f09872a4
3 changed files with 24 additions and 8 deletions

View File

@ -54,8 +54,8 @@ win32 {
INCLUDEPATH += ../dependencies/poppler/include/qt5 INCLUDEPATH += ../dependencies/poppler/include/qt5
} else { } else {
DEFINES += "USE_PDFIUM" DEFINES += "USE_PDFIUM"
LIBS += -L../dependencies/pdfium/x86 -lpdfium LIBS += -L$$PWD../dependencies/pdfium/x86 -lpdfium
INCLUDEPATH += ../dependencies/pdfium/public INCLUDEPATH += $$PWD../dependencies/pdfium/public
} }
} else { } else {
DEFINES += "NO_PDF" DEFINES += "NO_PDF"
@ -208,6 +208,10 @@ SOURCES += ../common/comic.cpp \
../common/scroll_management.cpp \ ../common/scroll_management.cpp \
../common/opengl_checker.cpp ../common/opengl_checker.cpp
CONFIG(pdfium) {
SOURCES+= ../common/pdf_comic.cpp
}
!CONFIG(no_opengl) { !CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) { CONFIG(legacy_gl_widget) {
message("using legacy YACReaderFlowGL (QGLWidget) source code") message("using legacy YACReaderFlowGL (QGLWidget) source code")

View File

@ -44,8 +44,8 @@ win32 {
INCLUDEPATH += ../dependencies/poppler/include/qt5 INCLUDEPATH += ../dependencies/poppler/include/qt5
} else { } else {
DEFINES += "USE_PDFIUM" DEFINES += "USE_PDFIUM"
LIBS += -L../dependencies/pdfium/x86 -lpdfium LIBS += -L$$PWD../dependencies/pdfium/x86 -lpdfium
INCLUDEPATH += ../dependencies/pdfium/public INCLUDEPATH += $$PWD../dependencies/pdfium/public
} }
} else { } else {
DEFINES += "NO_PDF" DEFINES += "NO_PDF"
@ -233,7 +233,6 @@ SOURCES += comic_flow.cpp \
../common/yacreader_global_gui.cpp \ ../common/yacreader_global_gui.cpp \
yacreader_libraries.cpp \ yacreader_libraries.cpp \
../common/exit_check.cpp \ ../common/exit_check.cpp \
../common/pdf_comic.cpp \
comics_view.cpp \ comics_view.cpp \
classic_comics_view.cpp \ classic_comics_view.cpp \
empty_folder_widget.cpp \ empty_folder_widget.cpp \
@ -257,6 +256,11 @@ SOURCES += comic_flow.cpp \
yacreader_comics_selection_helper.cpp \ yacreader_comics_selection_helper.cpp \
yacreader_comic_info_helper.cpp yacreader_comic_info_helper.cpp
CONFIG(pdfium) {
SOURCES += ../common/pdf_comic.cpp
}
!CONFIG(no_opengl) { !CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) { CONFIG(legacy_gl_widget) {
message("using legacy YACReaderFlowGL (QGLWidget) source code") message("using legacy YACReaderFlowGL (QGLWidget) source code")

View File

@ -20,8 +20,14 @@ include(headless_config.pri)
win32 { win32 {
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32 LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32
!CONFIG(no_pdf) { !CONFIG(no_pdf) {
LIBS += -lpoppler-qt5 !CONFIG(pdfium) {
INCLUDEPATH += ../dependencies/poppler/include/qt5 LIBS += -lpoppler-qt5
INCLUDEPATH += ../dependencies/poppler/include/qt5
} else {
DEFINES += "USE_PDFIUM"
LIBS += -L$$PWD../dependencies/pdfium/x86 -lpdfium
INCLUDEPATH += $$PWD../dependencies/pdfium/public
}
} else { } else {
DEFINES += "NO_PDF" DEFINES += "NO_PDF"
} }
@ -103,7 +109,6 @@ SOURCES += ../YACReaderLibrary/library_creator.cpp \
../common/folder.cpp \ ../common/folder.cpp \
../common/library_item.cpp \ ../common/library_item.cpp \
../common/comic.cpp \ ../common/comic.cpp \
../common/pdf_comic.cpp \
../common/bookmarks.cpp \ ../common/bookmarks.cpp \
../common/qnaturalsorting.cpp \ ../common/qnaturalsorting.cpp \
../YACReaderLibrary/yacreader_local_server.cpp \ ../YACReaderLibrary/yacreader_local_server.cpp \
@ -115,6 +120,9 @@ SOURCES += ../YACReaderLibrary/library_creator.cpp \
console_ui_library_creator.cpp \ console_ui_library_creator.cpp \
main.cpp main.cpp
CONFIG(pdfium) {
SOURCES += ../common/pdf_comic.cpp
}
include(../YACReaderLibrary/server/server.pri) include(../YACReaderLibrary/server/server.pri)