diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro index f498dfc7..22f1b20d 100644 --- a/YACReader/YACReader.pro +++ b/YACReader/YACReader.pro @@ -48,13 +48,13 @@ win32 { } else { LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32 } + !CONFIG(no_pdf) { LIBS += -lpoppler-qt5 INCLUDEPATH += ../dependencies/poppler/include/qt5 - } - else { - DEFINES += "NO_PDF" - } + } else { + DEFINES += "NO_PDF" + } QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL QMAKE_LFLAGS_RELEASE += /LTCG @@ -62,23 +62,22 @@ win32 { } unix:!macx{ - !CONFIG(no_pdf){ - !CONFIG(pdfium){ - INCLUDEPATH += /usr/include/poppler/qt5 - LIBS += -L/usr/lib -lpoppler-qt5 - } else { - #static pdfium libraries have to be included *before* dynamic libraries - DEFINES += "USE_PDFIUM" - INCLUDEPATH += /usr/include/pdfium - LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ - -lfxcrt -lfx_agg -lfxcodec -lfx_lpng -lfx_libopenjpeg -lfx_lcms2 -ljpeg \ - -lfx_zlib -lfdrm -lfxedit -lformfiller -lpdfwindow -lpdfium -lbigint -ljavascript \ - -lfxedit -Wl,--end-group -lfreetype - } - } -else { - DEFINES += "NO_PDF" -} + !CONFIG(no_pdf){ + !CONFIG(pdfium){ + INCLUDEPATH += /usr/include/poppler/qt5 + LIBS += -L/usr/lib -lpoppler-qt5 + } else { + #static pdfium libraries have to be included *before* dynamic libraries + DEFINES += "USE_PDFIUM" + INCLUDEPATH += /usr/include/pdfium + LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ + -lfxcrt -lfx_agg -lfxcodec -lfx_lpng -lfx_libopenjpeg -lfx_lcms2 -ljpeg \ + -lfx_zlib -lfdrm -lfxedit -lformfiller -lpdfwindow -lpdfium -lbigint -ljavascript \ + -lfxedit -Wl,--end-group -lfreetype + } + } else { + DEFINES += "NO_PDF" + } !CONFIG(no_opengl) { LIBS += -lGLU @@ -99,10 +98,9 @@ macx{ #TODO: pdfium support !CONFIG(no_pdf) { -DEFINES += "USE_PDFKIT" -} -else { -DEFINES += "NO_PDF" + DEFINES += "USE_PDFKIT" +} else { + DEFINES += "NO_PDF" } CONFIG += objective_c diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index ab744d27..b812f4c7 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -36,14 +36,15 @@ win32 { } else { LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32 } + + #TODO: pdfium for windows support !CONFIG(no_pdf) { LIBS += -lpoppler-qt5 INCLUDEPATH += ../dependencies/poppler/include/qt5 + } else { + DEFINES += "NO_PDF" } - else { - DEFINES += "NO_PDF" - } - #TODO: pdfium for windows support + QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL QMAKE_LFLAGS_RELEASE += /LTCG CONFIG -= embed_manifest_exe @@ -51,21 +52,20 @@ win32 { unix:!macx{ !CONFIG(no_pdf){ - !CONFIG(pdfium){ - INCLUDEPATH += /usr/include/poppler/qt5 + !CONFIG(pdfium){ + INCLUDEPATH += /usr/include/poppler/qt5 LIBS += -L/usr/lib -lpoppler-qt5 - } else { - #static pdfium libraries have to be included *before* dynamic libraries - DEFINES += "USE_PDFIUM" - INCLUDEPATH += /usr/include/pdfium - LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ + } else { + #static pdfium libraries have to be included *before* dynamic libraries + DEFINES += "USE_PDFIUM" + INCLUDEPATH += /usr/include/pdfium + LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ -lfxcrt -lfx_agg -lfxcodec -lfx_lpng -lfx_libopenjpeg -lfx_lcms2 -ljpeg \ -lfx_zlib -lfdrm -lfxedit -lformfiller -lpdfwindow -lpdfium -lbigint -ljavascript \ -lfxedit -Wl,--end-group -lfreetype - } -} -else { - DEFINES += "NO_PDF" + } +} else { + DEFINES += "NO_PDF" } !CONFIG(no_opengl) { @@ -88,10 +88,9 @@ macx{ !CONFIG(no_pdf){ #TODO:support for pdfium on mac DEFINES += "USE_PDFKIT" - } - else { +} else { DEFINES += "NO_PDF" - } +} LIBS += -framework Foundation -framework ApplicationServices -framework AppKit diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 1c6ea3a8..fa5d0953 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -20,11 +20,10 @@ include(headless_config.pri) win32 { LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32 !CONFIG(no_pdf) { - LIBS += -lpoppler-qt5 - INCLUDEPATH += ../dependencies/poppler/include/qt5 - } - else { - DEFINES += "NO_PDF" + LIBS += -lpoppler-qt5 + INCLUDEPATH += ../dependencies/poppler/include/qt5 + } else { + DEFINES += "NO_PDF" } QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL @@ -34,31 +33,29 @@ win32 { unix:!macx{ !CONFIG(no_pdf){ - !CONFIG(pdfium){ - INCLUDEPATH += /usr/include/poppler/qt5 - LIBS += -L/usr/lib -lpoppler-qt5 - } else { - #static pdfium libraries have to be included *before* dynamic libraries - DEFINES += "USE_PDFIUM" - INCLUDEPATH += /usr/include/pdfium - LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ + !CONFIG(pdfium){ + INCLUDEPATH += /usr/include/poppler/qt5 + LIBS += -L/usr/lib -lpoppler-qt5 + } else { + #static pdfium libraries have to be included *before* dynamic libraries + DEFINES += "USE_PDFIUM" + INCLUDEPATH += /usr/include/pdfium + LIBS += -L/usr/lib/pdfium -Wl,--start-group -lpdfium -lfpdfapi -lfxge -lfpdfdoc \ -lfxcrt -lfx_agg -lfxcodec -lfx_lpng -lfx_libopenjpeg -lfx_lcms2 -ljpeg \ -lfx_zlib -lfdrm -lfxedit -lformfiller -lpdfwindow -lpdfium -lbigint -ljavascript \ -lfxedit -Wl,--end-group -lfreetype - } - } -else { - DEFINES += "NO_PDF" + } +} else { + DEFINES += "NO_PDF" } } macx{ #TODO:support for pdfium on mac !CONFIG(no_pdf) { -DEFINES += "USE_PDFKIT" -} -else { -DEFINES += "NO_PDF" + DEFINES += "USE_PDFKIT" +} else { + DEFINES += "NO_PDF" } LIBS += -framework Foundation -framework ApplicationServices -framework AppKit