-
Notifications
You must be signed in to change notification settings - Fork 236
Use a specific version of zlib and bzip2 #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 8 commits
ad84c6c
b87e587
b8f7de9
a3e387f
1cb4e38
44d6d27
fe698e7
c71f09c
7943f90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,32 @@ quazip/(un)zip.h files for details, but basically it's the zlib license. | |
|
||
## Dependencies | ||
You need at least the following dependencies: | ||
- zlib | ||
- `cmake>=3.15` | ||
- Qt6 or Qt5 (searched in that order) | ||
- Optional dependencies (choose one): | ||
* `miniconda` | ||
* `conan` | ||
* `vcpkg` | ||
|
||
## Linux | ||
Using miniconda | ||
``` | ||
sudo apt-get install zlib1g-dev libbz2-dev | ||
cmake -B build | ||
cmake --build build | ||
conda env create -f dependencies.yml --prefix zlib | ||
cmake -DZLIB_ROOT=/quazip_project_root_dir/zlib/Library -B build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
cmake --build build --config Release | ||
``` | ||
|
||
Using conan v2 | ||
``` | ||
conan install . -of build -s build_type=Release -o *:shared=False --build=missing | ||
cmake --preset conan | ||
cmake --build build --config Release | ||
``` | ||
|
||
Using vcpkg | ||
``` | ||
cmake -B build --preset vcpkg | ||
cmake --build build --config Release | ||
``` | ||
|
||
## Windows | ||
|
@@ -54,9 +72,10 @@ If you don't use a package manager you will have to add library and include dire | |
Qt is not installed as a dependency of either vcpkg or conan. | ||
|
||
### x64 | ||
Using vcpkg | ||
Using miniconda | ||
``` | ||
cmake --preset vcpkg | ||
conda env create -f dependencies.yml --prefix dependencies | ||
cmake -DZLIB_ROOT=quazip_project_root_dir\dependencies\Library -B build | ||
cmake --build build --config Release | ||
``` | ||
|
||
|
@@ -67,29 +86,44 @@ cmake --preset conan | |
cmake --build build --config Release | ||
``` | ||
|
||
Using vcpkg | ||
``` | ||
cmake -B build --preset vcpkg | ||
cmake --build build --config Release | ||
``` | ||
|
||
### x86 | ||
Only Qt5 is tested on x86. | ||
|
||
Using vcpkg | ||
``` | ||
cmake --preset vcpkg_x86 | ||
cmake -B build --preset vcpkg_x86 | ||
cmake --build build --config Release | ||
``` | ||
|
||
Using conan v2 | ||
``` | ||
conan install . -of build -s build_type=Release -s:h arch=x86 -o *:shared=False --build=missing | ||
cmake --preset conan_x86 | ||
cmake -B build --preset conan_x86 | ||
cmake --build build --config Release | ||
``` | ||
|
||
## Additional build options | ||
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.8.2"`. | ||
Alternatively, if you did not install the source build it might look something like: `-DCMAKE_PREFIX_PATH="/home/you/qt-everywhere-src-6.8.2/qtbase/lib/cmake"`. | ||
Replace `qtbase` if you used a custom prefix at `configure` step. | ||
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.8.2"`. Alternatively, if you did not install the source build it might look something like: `-DCMAKE_PREFIX_PATH="/home/you/qt-everywhere-src-6.8.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. | ||
|
||
If you wish to build in debug mode, then in the cmake configuration command add: `-DCMAKE_BUILD_TYPE=Debug` and in the cmake build command and change `Release` to `Debug`: `cmake --build build --config Debug`. | ||
|
||
You may also build without BZIP2 when configuring the project with cmake: `-DQUAZIP_BZIP2=OFF`. | ||
|
||
Specifying a directory to install the build is also possible when running the cmake configure and build commands, like so: | ||
|
||
``` | ||
cmake -DCMAKE_INSTALL_PREFIX=/path/to/install | ||
cmake --build build --config Release --target install | ||
``` | ||
|
||
CMake is used to configure and build the project. A typical configure, build, install and clean is shown below. | ||
|
||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
- zlib=1.3.1. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only pinning zlib here since bzip2 gets cloned in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using miniconda isn't something that is preferred, I think that the
CMakeLists.txt
should be updated to useZLIB_ROOT
and if it's not found clone the git repo, similar to how it is done forbzip2