Add support for libunarr detection and move include/detection logic to unarr-wrapper.pri

This commit is contained in:
Felix Kauselmann
2015-04-29 13:12:22 +02:00
parent c4ddd42cd6
commit 9dc0d85c2d
4 changed files with 24 additions and 35 deletions

View File

@ -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)
}