Merged develop into mac_build

This commit is contained in:
Felix Kauselmann
2017-04-25 11:45:32 +02:00
58 changed files with 5911 additions and 486 deletions

View File

@ -11,6 +11,7 @@ QMAKE_MAC_SDK = macosx10.12
#load default build flags
include (../config.pri)
include (../dependencies/pdf_backend.pri)
unix:!macx{
QMAKE_CXXFLAGS += -std=c++11
@ -27,7 +28,7 @@ CONFIG(force_angle) {
SOURCES += main.cpp
INCLUDEPATH += ../common \
../custom_widgets
../custom_widgets
!CONFIG(no_opengl):CONFIG(legacy_gl_widget) {
INCLUDEPATH += ../common/gl_legacy \
@ -39,63 +40,24 @@ INCLUDEPATH += ../common \
win32 {
CONFIG(force_angle) {
message("using ANGLE")
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
#linking extra libs are necesary for a successful compilation, a better approach should be
#to remove any OpenGL (desktop) dependencies
#the OpenGL stuff should be migrated to OpenGL ES
DEFINES += FORCE_ANGLE
} else {
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
}
!CONFIG(no_pdf) {
!CONFIG(pdfium) {
LIBS += -lpoppler-qt5
INCLUDEPATH += ../dependencies/poppler/include/qt5
} else {
DEFINES += "USE_PDFIUM"
contains(QMAKE_TARGET.arch, x86_64): {
LIBS += -L$$PWD/../dependencies/pdfium/x64 -lpdfium
} else {
LIBS += -L$$PWD/../dependencies/pdfium/x86 -lpdfium
}
INCLUDEPATH += ../dependencies/pdfium/public
}
} else {
DEFINES += "NO_PDF"
}
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
QMAKE_LFLAGS_RELEASE += /LTCG
CONFIG -= embed_manifest_exe
}
unix:!macx{
!CONFIG(no_pdf){
!CONFIG(pdfium){
INCLUDEPATH += /usr/include/poppler/qt5
LIBS += -L/usr/lib -lpoppler-qt5
} else {
DEFINES += "USE_PDFIUM"
INCLUDEPATH += /usr/include/pdfium
LIBS += -L/usr/lib/pdfium -lpdfium -lfreetype
#static pdfium libraries have to be included *before* dynamic libraries
#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) {
unix:!macx:!CONFIG(no_opengl) {
LIBS += -lGLU
}
}
macx{
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
#isEqual(QT_MAJOR_VERSION, 5) {
@ -107,20 +69,11 @@ macx{
#LIBS += -L/usr/local/lib -lpoppler-qt4
#}
#TODO: pdfium support
!CONFIG(no_pdf) {
DEFINES += "USE_PDFKIT"
} else {
DEFINES += "NO_PDF"
}
CONFIG += objective_c
QT += macextras gui-private
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
OBJECTIVE_SOURCES += ../common/pdf_comic.mm
}
QT += network widgets core
@ -167,7 +120,7 @@ HEADERS += ../common/comic.h \
../common/exit_check.h \
../common/scroll_management.h \
../common/opengl_checker.h \
../common/pdf_comic.h
../common/pdf_comic.h
!CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) {
@ -214,10 +167,6 @@ SOURCES += ../common/comic.cpp \
../common/scroll_management.cpp \
../common/opengl_checker.cpp
CONFIG(pdfium) {
SOURCES+= ../common/pdf_comic.cpp
}
!CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) {
message("using legacy YACReaderFlowGL (QGLWidget) source code")
@ -310,4 +259,4 @@ manpage.files = ../YACReader.1
#remove leftover doc files when 'make clean' is invoked
QMAKE_CLEAN += "../changelog" "../README"
}
}