mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fix build config check
This commit is contained in:
parent
cc999cba66
commit
c764d428b4
@ -14,21 +14,8 @@ INCLUDEPATH += ../common \
|
|||||||
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT
|
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
#load default build flags
|
#load default build flags
|
||||||
#TODO include (../config.pri)
|
#do a basic dependency check
|
||||||
!CONFIG(unarr):!CONFIG(7zip) {
|
include(headless_config.pri)
|
||||||
unix {
|
|
||||||
!macx {
|
|
||||||
CONFIG+=unarr
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
CONFIG+=7zip
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
win32 {
|
|
||||||
CONFIG+=7zip
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32
|
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 -luser32
|
||||||
@ -148,9 +135,9 @@ INSTALLS += bin server translation #manpage
|
|||||||
|
|
||||||
bin.path = $$BINDIR
|
bin.path = $$BINDIR
|
||||||
isEmpty(DESTDIR) {
|
isEmpty(DESTDIR) {
|
||||||
bin.files = YACReaderLibrary
|
bin.files = YACReaderLibraryServer
|
||||||
} else {
|
} else {
|
||||||
bin.files = $$DESTDIR/YACReaderLibrary
|
bin.files = $$DESTDIR/YACReaderLibraryServer
|
||||||
}
|
}
|
||||||
|
|
||||||
server.path = $$DATADIR/yacreader
|
server.path = $$DATADIR/yacreader
|
||||||
@ -159,6 +146,6 @@ server.files = ../release/server
|
|||||||
translation.path = $$DATADIR/yacreader/languages
|
translation.path = $$DATADIR/yacreader/languages
|
||||||
translation.files = ../release/languages/yacreaderlibrary_*
|
translation.files = ../release/languages/yacreaderlibrary_*
|
||||||
|
|
||||||
manpage.path = $$DATADIR/man/man1
|
#manpage.path = $$DATADIR/man/man1
|
||||||
manpage.files = ../YACReaderLibrary.1
|
#manpage.files = ../YACReaderLibrary.1
|
||||||
}
|
}
|
||||||
|
67
YACReaderLibrary/headless_config.pri
Normal file
67
YACReaderLibrary/headless_config.pri
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#functions to automatically initialize some of YACReader's build options to
|
||||||
|
#default values if they're not set on build time
|
||||||
|
#for a more detailed description, see INSTALL.TXT
|
||||||
|
|
||||||
|
#check Qt version
|
||||||
|
QT_VERSION = $$[QT_VERSION]
|
||||||
|
QT_VERSION = $$split(QT_VERSION, ".")
|
||||||
|
QT_VER_MAJ = $$member(QT_VERSION, 0)
|
||||||
|
QT_VER_MIN = $$member(QT_VERSION, 1)
|
||||||
|
|
||||||
|
lessThan(QT_VER_MAJ, 5) {
|
||||||
|
error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.)
|
||||||
|
}
|
||||||
|
lessThan(QT_VER_MIN, 3){
|
||||||
|
error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary")
|
||||||
|
}
|
||||||
|
!CONFIG(unarr):!CONFIG(7zip) {
|
||||||
|
unix {
|
||||||
|
!macx {
|
||||||
|
CONFIG+=unarr
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CONFIG+=7zip
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
win32 {
|
||||||
|
CONFIG+=7zip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
packagesExist(QtCore) {
|
||||||
|
message("Found QtCore")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: QtCore")
|
||||||
|
}
|
||||||
|
packagesExist(QtGui) {
|
||||||
|
message("Found QtGui")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: QtGui")
|
||||||
|
}
|
||||||
|
packagesExist(poppler-qt5) {
|
||||||
|
message("Found poppler-qt5")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: poppler-qt5")
|
||||||
|
}
|
||||||
|
packagesExist(QtNetwork) {
|
||||||
|
message("Found QtNetwork")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: QtNetwork")
|
||||||
|
}
|
||||||
|
packagesExist(QtSql) {
|
||||||
|
message("Found QtSql")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: QtSql")
|
||||||
|
}
|
||||||
|
packagesExist(sqlite3) {
|
||||||
|
message("Found sqlite3")
|
||||||
|
}
|
||||||
|
else: {
|
||||||
|
error("Missing dependency: sqlite3")
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user