mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Add support for libunarr detection and move include/detection logic to unarr-wrapper.pri
This commit is contained in:
parent
c4ddd42cd6
commit
9dc0d85c2d
@ -223,12 +223,7 @@ exists (../compressed_archive/libp7zip) {
|
||||
Please check the compressed_archive folder for further instructions.)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
exists (../compressed_archive/unarr/unarr-master) {
|
||||
message(Found unarr source-code)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
#set install prefix if it's empty
|
||||
|
@ -285,11 +285,6 @@ exists (../compressed_archive/libp7zip) {
|
||||
Please check the compressed_archive folder for further instructions.)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
exists (../compressed_archive/unarr/unarr-master) {
|
||||
message(Found unarr source code)
|
||||
}
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
#set install prefix if it's empty
|
||||
|
@ -6,8 +6,27 @@ HEADERS += $$PWD/extract_delegate.h \
|
||||
|
||||
SOURCES += $$PWD/compressed_archive.cpp \
|
||||
|
||||
#static build (no lib)
|
||||
include(unarr.pro)
|
||||
unix:!macx:exists (/usr/include/unarr.h) {
|
||||
message(Using system provided unarr installation)
|
||||
LIBS+=-lunarr
|
||||
}
|
||||
else:macx:exists (../../dependencies/unarr/libunarr.dynlib) {
|
||||
LIBS += -L../../dependencies/unarr/ -lunarr
|
||||
}
|
||||
|
||||
#for system libunarr.so
|
||||
#LIBS+=-lunarr
|
||||
else:win32:exists (../../dependencies/unarr/unarr.dll) {
|
||||
LIBS += -L../../dependencies/unarr/ -lunarr
|
||||
}
|
||||
|
||||
else:exists ($$PWD/unarr-master) {
|
||||
message(Found unarr source-code)
|
||||
message(Unarr will be build as a part of YACReader)
|
||||
|
||||
#qmake based unarr build system
|
||||
#this should only be used for testing or as a last resort
|
||||
include(unarr.pro)
|
||||
}
|
||||
else {
|
||||
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)
|
||||
}
|
@ -13,26 +13,6 @@ win32 {
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
unix {
|
||||
#these flags are probably redundant
|
||||
#qmake tends to chose it's own flags and ignores system wide flags on unix
|
||||
QMAKE_CXXFLAGS+= -std=c++11 -O2 -pipe -Wall -fomit-frame-pointer
|
||||
QMAKE_CFLAGS+= -O2 -pipe -Wall -fomit-frame-pointer
|
||||
|
||||
#this might need a little tweaking on mac os
|
||||
!CONFIG(unarr){
|
||||
DEFINES += "LIBDIR=\\\"$$/usr/lib\\\""
|
||||
}
|
||||
else{
|
||||
#make unarr use system zlib and bzip2
|
||||
#these are pretty much standard on unix
|
||||
DEFINES += HAVE_ZLIB HAVE_BZIP2 NDEBUG
|
||||
#add zlib and bz2 to libs
|
||||
#we also need libm for mathematics
|
||||
LIBS += -lbz2 -lz -lm
|
||||
}
|
||||
}
|
||||
|
||||
!CONFIG(unarr){
|
||||
include(../../compressed_archive/wrapper.pri)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user