Skip to content

Commit

Permalink
Simplifications and cleanup to the build script
Browse files Browse the repository at this point in the history
* The script now supports zsh and bash to allow building from macOS and
  Linux with builtin zsh and bash version 3 or 4.
* It now uses curl instead of wget, wget is not builtin on macOS.
* Use the default NDk path from the Android SDK.
* Allow to set custom build and output folders.
* The various build folders for each version are now kept around under
  the 'build' folder.
* At the same time add the build folder to .gitignore.
* Create relative symlinks KDAB#61.
  • Loading branch information
Issam-b committed Sep 16, 2024
1 parent 57056d6 commit 4b29538
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 131 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
.DS_Store
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenSSL scripts and binaries for Android (useful for Qt Android apps)
In this repo you can find the prebuilt OpenSSL libs for Android, a QMake include project `.pri` file that can be used integrated with Qt projects, and a `.cmake` file for CMake based projects.

The following directories are available
* `ssl_3`: used for Qt 6.5.0+.
* `ssl_3`: for Qt 6.5.0+.
* `ssl_1_1`: for Qt Qt 5.12.5+, 5.13.1+, 5.14.0+, 5.15.0+, Qt 6.x.x up to 6.4.x

## How to use it
Expand All @@ -23,7 +23,7 @@ if (ANDROID)
FetchContent_Declare(
android_openssl
DOWNLOAD_EXTRACT_TIMESTAMP true
URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
# URL_HASH MD5=c97d6ad774fab16be63b0ab40f78d945 #optional
)
FetchContent_MakeAvailable(android_openssl)
Expand Down Expand Up @@ -51,14 +51,11 @@ endif()
## Build Script

The build script `build_ssl.sh` can be used to rebuild the OpenSSL libraries. Since specific
versions might depend or work better with specific NDK versions, the OpenSSL<==>NDK version
versions might depend or work better with specific NDK versions, the OpenSSL/NDK version
combinations are defined in the script. Before running the script, check that the NDK paths
are correct for your environment.

### Build Prerequisites

Both Linux, macOS need `patchelf` command when building for OpenSSL 3+.

Additionally, for macOS you need:
- `bash` shell version 4+ is required
- `wget` command
The build script was tested against `bash` and `zsh` on Linux and macOS.
The `patchelf` command is required when building for OpenSSL 3.
Loading

0 comments on commit 4b29538

Please sign in to comment.