mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Migrate the build system to cmake
This commit is contained in:
@ -7,9 +7,9 @@ This backend is currently only supported on the Linux platform.
|
||||
|
||||
## Using
|
||||
|
||||
Enabling this backend is achieved by adding the `libarchive` qmake configuration value:
|
||||
Enable this backend by setting the `DECOMPRESSION_BACKEND` CMake option:
|
||||
|
||||
qmake CONFIG+=libarchive
|
||||
cmake -B build -DDECOMPRESSION_BACKEND=libarchive
|
||||
|
||||
Upon success, the application can be built as normal.
|
||||
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
HEADERS += $$PWD/extract_delegate.h \
|
||||
$$PWD/compressed_archive.h
|
||||
|
||||
SOURCES += $$PWD/compressed_archive.cpp
|
||||
|
||||
if(mingw|unix):!macx:!contains(QT_CONFIG, no-pkg-config):packagesExist(libarchive) {
|
||||
message(Using system provided libarchive installation found by pkg-config.)
|
||||
!system(pkg-config --atleast-version=3.6.0 libarchive) {
|
||||
LIBARCHIVE_WARNING = "libarchive < 3.6.0 found. Older versions of libarchive DO NOT SUPPORT RARv4 files. This is probably not what you want"
|
||||
warning($$LIBARCHIVE_WARNING)
|
||||
message($$LIBARCHIVE_WARNING)
|
||||
}
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libarchive
|
||||
DEFINES += use_libarchive
|
||||
}
|
||||
else:unix:!macx:exists(/usr/include/archive.h) {
|
||||
message(Using system provided libarchive installation.)
|
||||
LIBS += -larchive
|
||||
DEFINES += use_libarchive
|
||||
}
|
||||
else:if(win32|macx) {
|
||||
error(Unsupported: the libarchive decompression backend is not currently supported on this system.)
|
||||
}
|
||||
else {
|
||||
error(Missing dependency: libarchive decompression backend. Please install libarchive on your system)
|
||||
}
|
||||
Reference in New Issue
Block a user