mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
rbutil: Try to use system-wide QuaZIP in preference to building our own
QuaZIP is included in several major Linux distributions and packaging policies strongly oppose bundling of libraries. Change-Id: I8d454784dc4b244f4dd8aa18deb3350a29aaab77
This commit is contained in:
parent
db2817eb1a
commit
4917f764bb
4 changed files with 44 additions and 35 deletions
|
@ -710,6 +710,7 @@ Marc Aarts
|
||||||
Fabrice Bellard
|
Fabrice Bellard
|
||||||
Selami Dinçer
|
Selami Dinçer
|
||||||
Matej Golian
|
Matej Golian
|
||||||
|
James Le Cuirot
|
||||||
|
|
||||||
The libmad team
|
The libmad team
|
||||||
The wavpack team
|
The wavpack team
|
||||||
|
|
|
@ -255,9 +255,44 @@ if(APPLE)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
|
${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET)
|
||||||
|
if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND)
|
||||||
|
message("-- Found QuaZip")
|
||||||
|
set(QUAZIP_LIBRARY QuaZip::QuaZip)
|
||||||
|
else()
|
||||||
|
message("-- QuaZip not found, building our own")
|
||||||
|
# TODO: Upstream has cmake support, use that instead.
|
||||||
|
add_library(quazip
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/ioapi.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/minizip_crypt.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/qioapi.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip_global.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.c
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.c
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.h
|
||||||
|
)
|
||||||
|
target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/quazip)
|
||||||
|
target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
|
||||||
|
if(QT_VERSION_MAJOR EQUAL 6)
|
||||||
|
target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
|
||||||
|
endif()
|
||||||
|
target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
|
||||||
|
set_property(TARGET quazip PROPERTY AUTOMOC ON)
|
||||||
|
set(QUAZIP_LIBRARY quazip)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(rbbase
|
target_link_libraries(rbbase
|
||||||
cutelogger quazip mspack bspatch rbspeex voicefont
|
cutelogger ${QUAZIP_LIBRARY} mspack bspatch rbspeex
|
||||||
sansapatcher ipodpatcher chinachippatcher
|
voicefont sansapatcher ipodpatcher chinachippatcher
|
||||||
mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot
|
mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot
|
||||||
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||||
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/base)
|
target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/base)
|
||||||
|
@ -298,33 +333,6 @@ target_link_libraries(cutelogger PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||||
target_compile_definitions(cutelogger PUBLIC CUTELOGGER_STATIC)
|
target_compile_definitions(cutelogger PUBLIC CUTELOGGER_STATIC)
|
||||||
set_property(TARGET cutelogger PROPERTY AUTOMOC ON)
|
set_property(TARGET cutelogger PROPERTY AUTOMOC ON)
|
||||||
|
|
||||||
# TODO: Upstream has cmake support, use that instead.
|
|
||||||
add_library(quazip
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/ioapi.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/minizip_crypt.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/qioapi.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip_global.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.c
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/quazip/zip.h
|
|
||||||
)
|
|
||||||
target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/quazip)
|
|
||||||
target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
|
|
||||||
if(QT_VERSION_MAJOR EQUAL 6)
|
|
||||||
target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
|
|
||||||
endif()
|
|
||||||
target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
|
|
||||||
set_property(TARGET quazip PROPERTY AUTOMOC ON)
|
|
||||||
|
|
||||||
add_library(mspack
|
add_library(mspack
|
||||||
#mspack/cabc.c
|
#mspack/cabc.c
|
||||||
mspack/cabd.c
|
mspack/cabd.c
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
#include "progressloglevels.h"
|
#include "progressloglevels.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
#include "quazip/quazip.h"
|
#include <quazip.h>
|
||||||
#include "quazip/quazipfile.h"
|
#include <quazipfile.h>
|
||||||
#include "quazip/quazipfileinfo.h"
|
#include <quazipfileinfo.h>
|
||||||
|
|
||||||
|
|
||||||
ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
|
ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include "archiveutil.h"
|
#include "archiveutil.h"
|
||||||
#include "quazip/quazip.h"
|
#include <quazip.h>
|
||||||
#include "quazip/quazipfile.h"
|
#include <quazipfile.h>
|
||||||
#include "quazip/quazipfileinfo.h"
|
#include <quazipfileinfo.h>
|
||||||
|
|
||||||
class ZipUtil : public ArchiveUtil
|
class ZipUtil : public ArchiveUtil
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue