mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 08:55:05 -04:00
Merged luisangelsm/yacreader into default
This commit is contained in:
@ -8,41 +8,51 @@ DEPENDPATH += . \
|
||||
|
||||
DEFINES += NOMINMAX YACREADER
|
||||
|
||||
CONFIG(no_opengl) {
|
||||
DEFINES += NO_OPENGL
|
||||
#load default build flags
|
||||
include (../config.pri)
|
||||
|
||||
unix:!macx{
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
}
|
||||
|
||||
|
||||
unix:!macx{
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
CONFIG(force_angle) {
|
||||
Release:DESTDIR = ../release_angle
|
||||
Debug:DESTDIR = ../debug_angle
|
||||
} else {
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
}
|
||||
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
INCLUDEPATH += ../common \
|
||||
../custom_widgets
|
||||
|
||||
CONFIG(legacy_gl_widget) {
|
||||
!CONFIG(no_opengl):CONFIG(legacy_gl_widget) {
|
||||
INCLUDEPATH += ../common/gl_legacy \
|
||||
} else {
|
||||
INCLUDEPATH += ../common/gl \
|
||||
}
|
||||
|
||||
#there are going to be two builds for windows, OpenGL based and ANGLE based
|
||||
win32 {
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32
|
||||
CONFIG(force_angle) {
|
||||
message("using ANGLE")
|
||||
LIBS += -L../dependencies/poppler/lib -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 += -lpoppler-qt5
|
||||
INCLUDEPATH += ../dependencies/poppler/include/qt5
|
||||
LIBS += -lpoppler-qt5
|
||||
INCLUDEPATH += ../dependencies/poppler/include/qt5
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT
|
||||
!CONFIG(no_opengl) {
|
||||
QMAKE_CXXFLAGS_RELEASE += /GL
|
||||
}
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
CONFIG -= embed_manifest_exe
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
@ -118,7 +128,8 @@ HEADERS += ../common/comic.h \
|
||||
yacreader_local_client.h \
|
||||
../common/http_worker.h \
|
||||
../common/exit_check.h \
|
||||
../common/scroll_management.h
|
||||
../common/scroll_management.h \
|
||||
../common/opengl_checker.h
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
@ -161,7 +172,8 @@ SOURCES += ../common/comic.cpp \
|
||||
../common/http_worker.cpp \
|
||||
../common/yacreader_global.cpp \
|
||||
../common/exit_check.cpp \
|
||||
../common/scroll_management.cpp
|
||||
../common/scroll_management.cpp \
|
||||
../common/opengl_checker.cpp
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
@ -174,7 +186,13 @@ SOURCES += ../common/comic.cpp \
|
||||
}
|
||||
|
||||
include(../custom_widgets/custom_widgets_yacreader.pri)
|
||||
CONFIG(7zip){
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr){
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
include(../shortcuts_management/shortcuts_management.pri)
|
||||
|
||||
RESOURCES += yacreader_images.qrc \
|
||||
@ -202,24 +220,6 @@ TRANSLATIONS = yacreader_es.ts \
|
||||
yacreader_de.ts \
|
||||
yacreader_source.ts
|
||||
|
||||
|
||||
win32 {
|
||||
!exists (../compressed_archive/lib7zip) {
|
||||
error(You\'ll need 7zip source code to compile YACReader. \
|
||||
Please check the compressed_archive folder for further instructions.)
|
||||
}
|
||||
}
|
||||
|
||||
unix {
|
||||
exists (../compressed_archive/libp7zip) {
|
||||
message(Found p7zip source code...)
|
||||
system(patch -d ../compressed_archive -N -p0 -i libp7zip.patch)
|
||||
} else {
|
||||
error(You\'ll need 7zip source code to compile YACReader. \
|
||||
Please check the compressed_archive folder for further instructions.)
|
||||
}
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
#set install prefix if it's empty
|
||||
isEmpty(PREFIX) {
|
||||
|
Reference in New Issue
Block a user