Use pkg-config to detect (lib)unarr on unix

This commit is contained in:
Felix Kauselmann 2017-09-19 15:45:46 +02:00
parent 0b14e7a830
commit 169904421c

View File

@ -6,10 +6,11 @@ HEADERS += $$PWD/extract_delegate.h \
SOURCES += $$PWD/compressed_archive.cpp \ SOURCES += $$PWD/compressed_archive.cpp \
unix:!macx:exists (/usr/include/unarr.h) { unix:!macx {
message(Using system provided unarr installation) message(Using system provided unarr installation)
LIBS+=-lunarr CONFIG += link_pkgconfig
DEFINES+=use_unarr PKGCONFIG += libunarr
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.)
@ -32,7 +33,7 @@ else:win32:exists (../../dependencies/unarr/win/unarr.h) {
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)