mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 09:24:57 -04:00
Buildsystem: add folders for 64bit build and improve dependencies detection.
This commit is contained in:
@ -1,6 +1,3 @@
|
|||||||
# #####################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) mié 8. oct 20:54:05 2008
|
|
||||||
# #####################################################################
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = YACReader
|
TARGET = YACReader
|
||||||
|
|
||||||
@ -21,11 +18,21 @@ unix:!macx{
|
|||||||
}
|
}
|
||||||
|
|
||||||
CONFIG(force_angle) {
|
CONFIG(force_angle) {
|
||||||
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
|
Release:DESTDIR = ../release64_angle
|
||||||
|
Debug:DESTDIR = ../debug64_angle
|
||||||
|
} else {
|
||||||
Release:DESTDIR = ../release_angle
|
Release:DESTDIR = ../release_angle
|
||||||
Debug:DESTDIR = ../debug_angle
|
Debug:DESTDIR = ../debug_angle
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
|
Release:DESTDIR = ../release64
|
||||||
|
Debug:DESTDIR = ../debug64
|
||||||
|
} else {
|
||||||
Release:DESTDIR = ../release
|
Release:DESTDIR = ../release
|
||||||
Debug:DESTDIR = ../debug
|
Debug:DESTDIR = ../debug
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
@ -61,25 +68,13 @@ unix:!macx:!CONFIG(no_opengl) {
|
|||||||
LIBS += -lGLU
|
LIBS += -lGLU
|
||||||
}
|
}
|
||||||
|
|
||||||
macx{
|
macx {
|
||||||
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
|
QT += macextras gui-private
|
||||||
#isEqual(QT_MAJOR_VERSION, 5) {
|
CONFIG += objective_c
|
||||||
#INCLUDEPATH += /usr/local/include/poppler/qt5
|
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||||
#LIBS += -L/usr/local/lib -lpoppler-qt5
|
|
||||||
#}
|
|
||||||
#else {
|
|
||||||
#INCLUDEPATH += /usr/local/include/poppler/qt4
|
|
||||||
#LIBS += -L/usr/local/lib -lpoppler-qt4
|
|
||||||
#}
|
|
||||||
|
|
||||||
CONFIG += objective_c
|
|
||||||
QT += macextras gui-private
|
|
||||||
|
|
||||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QT += network widgets core
|
QT += network widgets core multimedia
|
||||||
!CONFIG(no_opengl) {
|
!CONFIG(no_opengl) {
|
||||||
QT += opengl
|
QT += opengl
|
||||||
}
|
}
|
||||||
@ -87,9 +82,7 @@ QT += network widgets core
|
|||||||
#CONFIG += release
|
#CONFIG += release
|
||||||
CONFIG -= flat
|
CONFIG -= flat
|
||||||
|
|
||||||
QT += multimedia
|
# Sources
|
||||||
|
|
||||||
# Input
|
|
||||||
HEADERS += ../common/comic.h \
|
HEADERS += ../common/comic.h \
|
||||||
configuration.h \
|
configuration.h \
|
||||||
goto_dialog.h \
|
goto_dialog.h \
|
||||||
@ -127,7 +120,7 @@ HEADERS += ../common/comic.h \
|
|||||||
|
|
||||||
!CONFIG(no_opengl) {
|
!CONFIG(no_opengl) {
|
||||||
CONFIG(legacy_gl_widget) {
|
CONFIG(legacy_gl_widget) {
|
||||||
message("using legacy YACReaderFlowGL (QGLWidget) header")
|
message("Using legacy YACReaderFlowGL (QGLWidget) header")
|
||||||
DEFINES += YACREADER_LEGACY_FLOW_GL
|
DEFINES += YACREADER_LEGACY_FLOW_GL
|
||||||
HEADERS += ../common/gl_legacy/yacreader_flow_gl.h
|
HEADERS += ../common/gl_legacy/yacreader_flow_gl.h
|
||||||
} else {
|
} else {
|
||||||
@ -197,7 +190,6 @@ win32:RESOURCES += yacreader_images_win.qrc
|
|||||||
unix:!macx:RESOURCES += yacreader_images_win.qrc
|
unix:!macx:RESOURCES += yacreader_images_win.qrc
|
||||||
macx:RESOURCES += yacreader_images_osx.qrc
|
macx:RESOURCES += yacreader_images_osx.qrc
|
||||||
|
|
||||||
|
|
||||||
include(../QsLog/QsLog.pri)
|
include(../QsLog/QsLog.pri)
|
||||||
|
|
||||||
RC_FILE = icon.rc
|
RC_FILE = icon.rc
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = YACReaderLibrary
|
TARGET = YACReaderLibrary
|
||||||
|
|
||||||
QMAKE_TARGET_BUNDLE_PREFIX = "com.yacreader"
|
QMAKE_TARGET_BUNDLE_PREFIX = "com.yacreader"
|
||||||
|
|
||||||
DEPENDPATH += .
|
DEPENDPATH += .
|
||||||
INCLUDEPATH += .
|
INCLUDEPATH += . \
|
||||||
INCLUDEPATH += ../common \
|
../common \
|
||||||
./server \
|
./server \
|
||||||
./db \
|
./db \
|
||||||
../custom_widgets \
|
../custom_widgets \
|
||||||
@ -18,7 +14,8 @@ INCLUDEPATH += ../common \
|
|||||||
|
|
||||||
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY
|
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY
|
||||||
QMAKE_MAC_SDK = macosx10.12
|
QMAKE_MAC_SDK = macosx10.12
|
||||||
#load default build flags
|
|
||||||
|
# load default build flags
|
||||||
include (../config.pri)
|
include (../config.pri)
|
||||||
include (../dependencies/pdf_backend.pri)
|
include (../dependencies/pdf_backend.pri)
|
||||||
|
|
||||||
@ -28,14 +25,14 @@ CONFIG(legacy_gl_widget) {
|
|||||||
INCLUDEPATH += ../common/gl \
|
INCLUDEPATH += ../common/gl \
|
||||||
}
|
}
|
||||||
|
|
||||||
#there are going to be two builds for windows, OpenGL based and ANGLE based
|
# there are two builds for Windows, Desktop OpenGL based and ANGLE OpenGL ES based
|
||||||
win32 {
|
win32 {
|
||||||
CONFIG(force_angle) {
|
CONFIG(force_angle) {
|
||||||
message("using ANGLE")
|
message("using ANGLE")
|
||||||
LIBS += -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
|
# linking extra libs are necesary for a successful compilation, a better approach should be
|
||||||
#to remove any OpenGL (desktop) dependencies
|
# to remove any OpenGL (desktop) dependencies
|
||||||
#the OpenGL stuff should be migrated to OpenGL ES
|
# the OpenGL stuff should be migrated to OpenGL ES
|
||||||
DEFINES += FORCE_ANGLE
|
DEFINES += FORCE_ANGLE
|
||||||
} else {
|
} else {
|
||||||
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
||||||
@ -46,24 +43,29 @@ win32 {
|
|||||||
CONFIG -= embed_manifest_exe
|
CONFIG -= embed_manifest_exe
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:!macx{
|
CONFIG(force_angle) {
|
||||||
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
!CONFIG(no_opengl) {
|
Release:DESTDIR = ../release64_angle
|
||||||
LIBS += -lGLU
|
Debug:DESTDIR = ../debug64_angle
|
||||||
|
} else {
|
||||||
|
Release:DESTDIR = ../release_angle
|
||||||
|
Debug:DESTDIR = ../debug_angle
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
|
Release:DESTDIR = ../release64
|
||||||
|
Debug:DESTDIR = ../debug64
|
||||||
|
} else {
|
||||||
|
Release:DESTDIR = ../release
|
||||||
|
Debug:DESTDIR = ../debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
macx{
|
unix:!macx:!CONFIG(no_opengl) {
|
||||||
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
|
LIBS += -lGLU
|
||||||
#isEqual(QT_MAJOR_VERSION, 5) {
|
}
|
||||||
#INCLUDEPATH += /usr/local/include/poppler/qt5
|
|
||||||
#LIBS += -L/usr/local/lib -lpoppler-qt5
|
macx {
|
||||||
#}
|
|
||||||
#else {
|
|
||||||
#INCLUDEPATH += /usr/local/include/poppler/qt4
|
|
||||||
#LIBS += -L/usr/local/lib -lpoppler-qt4
|
|
||||||
#}
|
|
||||||
#QT += macextras
|
|
||||||
|
|
||||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||||
|
|
||||||
@ -71,8 +73,8 @@ CONFIG += objective_c
|
|||||||
QT += macextras gui-private
|
QT += macextras gui-private
|
||||||
}
|
}
|
||||||
|
|
||||||
unix{
|
unix:!macx {
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
}
|
}
|
||||||
|
|
||||||
#CONFIG += release
|
#CONFIG += release
|
||||||
@ -234,6 +236,7 @@ SOURCES += comic_flow.cpp \
|
|||||||
|
|
||||||
include(./server/server.pri)
|
include(./server/server.pri)
|
||||||
include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)
|
include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)
|
||||||
|
|
||||||
CONFIG(7zip){
|
CONFIG(7zip){
|
||||||
include(../compressed_archive/wrapper.pri)
|
include(../compressed_archive/wrapper.pri)
|
||||||
} else:CONFIG(unarr) {
|
} else:CONFIG(unarr) {
|
||||||
@ -266,14 +269,6 @@ TRANSLATIONS = yacreaderlibrary_es.ts \
|
|||||||
yacreaderlibrary_de.ts \
|
yacreaderlibrary_de.ts \
|
||||||
yacreaderlibrary_source.ts
|
yacreaderlibrary_source.ts
|
||||||
|
|
||||||
CONFIG(force_angle) {
|
|
||||||
Release:DESTDIR = ../release_angle
|
|
||||||
Debug:DESTDIR = ../debug_angle
|
|
||||||
} else {
|
|
||||||
Release:DESTDIR = ../release
|
|
||||||
Debug:DESTDIR = ../debug
|
|
||||||
}
|
|
||||||
|
|
||||||
#QML/GridView
|
#QML/GridView
|
||||||
QT += quick qml
|
QT += quick qml
|
||||||
|
|
||||||
@ -318,7 +313,6 @@ icon.files = ../YACReaderLibrary.png
|
|||||||
|
|
||||||
desktop.path = $$DATADIR/applications
|
desktop.path = $$DATADIR/applications
|
||||||
desktop.files = ../YACReaderLibrary.desktop
|
desktop.files = ../YACReaderLibrary.desktop
|
||||||
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
|
|
||||||
|
|
||||||
translation.path = $$DATADIR/yacreader/languages
|
translation.path = $$DATADIR/yacreader/languages
|
||||||
translation.files = ../release/languages/yacreaderlibrary_*
|
translation.files = ../release/languages/yacreaderlibrary_*
|
||||||
|
@ -2,24 +2,25 @@ INCLUDEPATH += $$PWD
|
|||||||
DEPENDPATH += $$PWD
|
DEPENDPATH += $$PWD
|
||||||
|
|
||||||
HEADERS += $$PWD/extract_delegate.h \
|
HEADERS += $$PWD/extract_delegate.h \
|
||||||
$$PWD/compressed_archive.h \
|
$$PWD/compressed_archive.h
|
||||||
|
|
||||||
SOURCES += $$PWD/compressed_archive.cpp \
|
SOURCES += $$PWD/compressed_archive.cpp
|
||||||
|
|
||||||
unix:!macx {
|
unix:!macx:packagesExist(libunarr) {
|
||||||
message(Using system provided unarr installation)
|
message(Using system provided unarr installation)
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += libunarr
|
PKGCONFIG += libunarr
|
||||||
DEFINES += use_unarr
|
DEFINES += use_unarr
|
||||||
}
|
}
|
||||||
else:macx:exists (../../dependencies/unarr/macx/libunarr.a) {
|
|
||||||
|
else:macx:exists(../../dependencies/unarr/macx/libunarr.a) {
|
||||||
message(Found prebuilt unarr library in dependencies directory.)
|
message(Found prebuilt unarr library in dependencies directory.)
|
||||||
INCLUDEPATH += $$PWD/../../dependencies/unarr/macx
|
INCLUDEPATH += $$PWD/../../dependencies/unarr/macx
|
||||||
LIBS += -L$$PWD/../../dependencies/unarr/macx -lunarr -lz -lbz2
|
LIBS += -L$$PWD/../../dependencies/unarr/macx -lunarr -lz -lbz2
|
||||||
DEFINES+=use_unarr
|
DEFINES += use_unarr
|
||||||
}
|
}
|
||||||
|
|
||||||
else:win32:exists (../../dependencies/unarr/win/unarr.h) {
|
else:win32:exists(../../dependencies/unarr/win/unarr.h) {
|
||||||
message(Found prebuilt unarr library in dependencies directory.)
|
message(Found prebuilt unarr library in dependencies directory.)
|
||||||
INCLUDEPATH += $$PWD/../../dependencies/unarr/win
|
INCLUDEPATH += $$PWD/../../dependencies/unarr/win
|
||||||
contains(QMAKE_TARGET.arch, x86_64): {
|
contains(QMAKE_TARGET.arch, x86_64): {
|
||||||
@ -27,18 +28,19 @@ else:win32:exists (../../dependencies/unarr/win/unarr.h) {
|
|||||||
} else {
|
} else {
|
||||||
LIBS += -L$$PWD/../../dependencies/unarr/win/x86 -lunarr
|
LIBS += -L$$PWD/../../dependencies/unarr/win/x86 -lunarr
|
||||||
}
|
}
|
||||||
DEFINES+=use_unarr UNARR_IS_SHARED_LIBRARY
|
DEFINES += use_unarr UNARR_IS_SHARED_LIBRARY
|
||||||
}
|
}
|
||||||
|
|
||||||
else:exists ($$PWD/unarr-master) {
|
else:exists ($$PWD/unarr-master) {
|
||||||
message(Found unarr source-code)
|
message(Found unarr source-code)
|
||||||
message(Unarr will be build as a part of YACReader)
|
message(Unarr will be build as a part of YACReader)
|
||||||
|
|
||||||
#qmake based unarr build system
|
# qmake based unarr build system
|
||||||
#this should only be used for testing or as a last resort
|
# this should only be used for testing or as a last resort
|
||||||
include(unarr.pro)
|
include(unarr.pro)
|
||||||
DEFINES+=use_unarr
|
DEFINES += use_unarr
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
|
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
|
||||||
or provide a copy of the unarr source code in compressed_archive/unarr/unarr-master)
|
or provide a copy of the unarr source code in compressed_archive/unarr/unarr-master)
|
||||||
|
24
dependencies/pdf_backend.pri
vendored
24
dependencies/pdf_backend.pri
vendored
@ -18,12 +18,19 @@ CONFIG(pdfium) {
|
|||||||
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
LIBS += -L$$PWD/pdfium/macx/bin -lpdfium
|
||||||
INCLUDEPATH += $$PWD/pdfium/macx/include
|
INCLUDEPATH += $$PWD/pdfium/macx/include
|
||||||
}
|
}
|
||||||
!macx {
|
!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
|
INCLUDEPATH += /usr/include/pdfium
|
||||||
LIBS += -L/usr/lib/pdfium -lpdfium -lfreetype
|
LIBS += -L/usr/lib/pdfium -lpdfium
|
||||||
}
|
} else {
|
||||||
|
error(Could not find libpdfium.)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CONFIG(pdfkit) {
|
CONFIG(pdfkit) {
|
||||||
!macx {
|
!macx {
|
||||||
@ -37,19 +44,24 @@ CONFIG(pdfkit) {
|
|||||||
CONFIG(poppler) {
|
CONFIG(poppler) {
|
||||||
win32 {
|
win32 {
|
||||||
contains(QMAKE_TARGET.arch, x86_64): {
|
contains(QMAKE_TARGET.arch, x86_64): {
|
||||||
error ("We currently don't ship precompiled poppler libraries for 64 bit builds")
|
error ("We currently don't ship precompiled poppler libraries for 64 bit builds on Windows")
|
||||||
}
|
}
|
||||||
INCLUDEPATH += $$PWD/poppler/include/qt5
|
INCLUDEPATH += $$PWD/poppler/include/qt5
|
||||||
LIBS += -L$$PWD/poppler/lib -lpoppler-qt5
|
LIBS += -L$$PWD/poppler/lib -lpoppler-qt5
|
||||||
#Add extra paths for dll dependencies so the executables don't crash when launching
|
# Add extra paths for dll dependencies so the executables don't crash when launching
|
||||||
#from QtCreator
|
# from QtCreator
|
||||||
LIBS += -L$$PWD/poppler/bin
|
LIBS += -L$$PWD/poppler/bin
|
||||||
LIBS += -L$$PWD/poppler/dependencies/bin
|
LIBS += -L$$PWD/poppler/dependencies/bin
|
||||||
}
|
}
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
|
packagesExist(poppler-qt5) {
|
||||||
|
CONFIG += link_pkgconfig
|
||||||
|
PKGCONFIG += poppler-qt5
|
||||||
|
} else {
|
||||||
INCLUDEPATH += /usr/include/poppler/qt5
|
INCLUDEPATH += /usr/include/poppler/qt5
|
||||||
LIBS += -L/usr/lib -lpoppler-qt5
|
LIBS += -L/usr/lib -lpoppler-qt5
|
||||||
}
|
}
|
||||||
|
}
|
||||||
unix:macx {
|
unix:macx {
|
||||||
error (Poppler backend is currently not supported on macOS)
|
error (Poppler backend is currently not supported on macOS)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user