Skip to content

Commit

Permalink
add basic build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
cen1 committed Mar 7, 2024
1 parent b531669 commit 97fe4a1
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Conan Center](https://shields.io/conan/v/quazip)](https://conan.io/center/recipes/quazip)

QuaZip is the C++ wrapper for Gilles Vollant's ZIP/UNZIP package
(AKA Minizip) using Trolltech's Qt library.
(AKA Minizip) using Qt library.

If you need to write files to a ZIP archive or read files from one
using QIODevice API, QuaZip is exactly the kind of tool you need.
Expand All @@ -25,3 +25,36 @@ Distributed under LGPL, full details in the COPYING file.

Original ZIP package is copyrighted by Gilles Vollant, see
quazip/(un)zip.h files for details, but basically it's the zlib license.

## Build

You need at least the following dependencies:
- zlib
- Qt6, Qt5 or Qt4 (searched in that order)

If you built Qt from source and installed it, you might need to tell CMake where to find it, for example: `-DCMAKE_PREFIX_PATH="/usr/local/Qt-6.6.2"`.
Alternatively, if you did not install the source build it might look something like: `-DCMAKE_PREFIX_PATH="/home/you/qt-everywhere-src-6.6.2/qtbase/lib/cmake"`.
Replace `qtbase` if you used a custom prefix at `configure` step.

Qt installed through Linux distribution packages or official Qt online installer should be detected automatically.

CMake is used to configure and build the project.

```
cmake -B build
cmake --build build --config Release
sudo cmake --install build
cmake --build build --target clean
```

CMake options

| Option | Description | Default |
|--------------------------|-------------------------------------------------------------------------------------------------------|--------------|
| `BUILD_SHARED_LIBS` | Build QuaZip as a shared library | `ON` |
| `QUAZIP_INSTALL` | Enable installation | `ON` |
| `QUAZIP_USE_QT_ZLIB` | Use Qt's bundled zlib instead of system zlib (**not recommended**). Qt must be built with `-qt-zlib`. | `OFF` |
| `QUAZIP_ENABLE_TESTS` | Build QuaZip tests | `OFF` |
| `QUAZIP_BZIP2` | Enable BZIP2 compression | `ON` |
| `QUAZIP_BZIP2_STDIO` | Output BZIP2 errors to stdio when BZIP2 compression is enabled | `ON` |

0 comments on commit 97fe4a1

Please sign in to comment.