Don't use bundled QuaZip
authorMoritz Schlarb <schlarbm@uni-mainz.de>
Thu, 24 May 2018 14:28:02 +0000 (16:28 +0200)
committerMoritz Schlarb <schlarbm@uni-mainz.de>
Tue, 29 Jan 2019 19:19:41 +0000 (19:19 +0000)
Gbp-Pq: Name 0002-Don-t-use-bundled-QuaZip.patch

CMakeLists.txt

index 966f30b207d2ec619d405252a6f8d7ae2d9d9f12..41e019a4d69b897e1b5c01a5fef4ef913cf42b71 100644 (file)
@@ -206,8 +206,6 @@ if (APPLE)
     SET(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
 endif()
 
-ADD_DEFINITIONS(-DQUAZIP_STATIC)
-
 # MOC FILES
 SET(moc_headers
   src/seafile-applet.h
@@ -293,7 +291,6 @@ SET(moc_headers
   src/filebrowser/transfer-mgr.h
   src/filebrowser/thumbnail-service.h
   third_party/QtAwesome/QtAwesome.h
-  third_party/quazip/quazipfile.h
   ${platform_specific_moc_headers}
 )
 
@@ -498,7 +495,6 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}/src
   ${CMAKE_CURRENT_SOURCE_DIR}/third_party/QtAwesome
-  ${CMAKE_CURRENT_SOURCE_DIR}/third_party/quazip
   )
 
 FOREACH(USE_QT_LIBRARY ${USE_QT_LIBRARIES})
@@ -591,27 +587,12 @@ ENDIF()
 
 ADD_SC_LIBRARY(utils ${utils_sources})
 
-# library quazip
-LIST(APPEND quazip_sources
-    third_party/quazip/JlCompress.cpp
-    third_party/quazip/quazip.cpp
-    third_party/quazip/quazipfile.cpp
-    third_party/quazip/quazipfileinfo.cpp
-    third_party/quazip/quaziodevice.cpp
-    third_party/quazip/quagzipfile.cpp
-    third_party/quazip/quazipnewinfo.cpp
-    third_party/quazip/quaadler32.cpp
-    third_party/quazip/quazipdir.cpp
-    third_party/quazip/quacrc32.cpp
-    third_party/quazip/qioapi.cpp
-    third_party/quazip/zip.c
-    third_party/quazip/unzip.c
-    )
-
-ADD_SC_LIBRARY(quazip ${quazip_sources})
+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/quazip")
+FIND_PACKAGE(QuaZip5 REQUIRED)
+INCLUDE_DIRECTORIES(${QUAZIP_INCLUDE_DIRS})
+SET(EXTRA_LIBS ${EXTRA_LIBS} ${QUAZIP_LIBRARIES})
 
-SET(SC_LIBS utils quazip)
-#SET(SC_LIBS utils)
+SET(SC_LIBS utils)
 
 ####################
 ###### end: lib