Changeset View
Changeset View
Standalone View
Standalone View
depends/README.md
Show All 32 Lines | |||||
The platform files are located under `cmake/platforms/`. | The platform files are located under `cmake/platforms/`. | ||||
For example, cross-building for macOS (run from the project root): | For example, cross-building for macOS (run from the project root): | ||||
mkdir build_osx | mkdir build_osx | ||||
cd build_osx | cd build_osx | ||||
cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake | cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake | ||||
ninja | ninja | ||||
The paths are automatically configured and no other options are needed unless | The paths are automatically configured and no other options are needed unless targeting [Android](#Android). | ||||
targeting Android. Before proceeding with an Android build one needs to get the | |||||
[Android SDK](https://developer.android.com/studio) and use the "SDK Manager" | |||||
tool to download the NDK and one or more "Platform packages" (these are Android | |||||
versions and have a corresponding API level). | |||||
In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android | |||||
version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to | |||||
be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending | |||||
on the platform the build is being performed on) need to be set. If the build | |||||
includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK`need to be set | |||||
as well but can otherwise be omitted. | |||||
This is an example command for a default build with no disabled dependencies | |||||
(the paths needs to be adapted to match your installation): | |||||
export ANDROID_SDK=${HOME}/Android/Sdk | |||||
export ANDROID_NDK=${ANDROID_SDK}/ndk-bundle | |||||
export ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin | |||||
export ANDROID_API_LEVEL=28 | |||||
make build-android-aarch64 | |||||
### Install the required dependencies: Ubuntu & Debian | ### Install the required dependencies: Ubuntu & Debian | ||||
#### Common to all arch/OS | #### Common to all arch/OS | ||||
sudo apt-get install build-essential autoconf automake cmake curl git libtool ninja-build patch pkg-config python3 | sudo apt-get install build-essential autoconf automake cmake curl git libtool ninja-build patch pkg-config python3 | ||||
#### For macOS cross compilation | #### For macOS cross compilation | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
Additional targets: | Additional targets: | ||||
download: run 'make download' to fetch all sources without building them | download: run 'make download' to fetch all sources without building them | ||||
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds | download-osx: run 'make download-osx' to fetch all sources needed for macOS builds | ||||
download-win: run 'make download-win' to fetch all sources needed for win builds | download-win: run 'make download-win' to fetch all sources needed for win builds | ||||
download-linux: run 'make download-linux' to fetch all sources needed for linux builds | download-linux: run 'make download-linux' to fetch all sources needed for linux builds | ||||
build-all: build the dependencies for all the arch/OS | build-all: build the dependencies for all the arch/OS | ||||
### Android | |||||
Before proceeding with an Android build one needs to get the | |||||
[Android SDK](https://developer.android.com/studio) and use the "SDK Manager" | |||||
tool to download the NDK and one or more "Platform packages" (these are Android | |||||
versions and have a corresponding API level). | |||||
In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android | |||||
version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to | |||||
be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending | |||||
on the platform the build is being performed on) need to be set. | |||||
API levels from 24 to 29 have been tested to work. | |||||
jasonbcox: Have you tested at least some of these or are we just backporting this as-is? From the stack… | |||||
If the build includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK`need to be set | |||||
jasonbcoxUnsubmitted Not Done Inline ActionsMissing space between: ANDROID_NDK`need jasonbcox: Missing space between: ANDROID_NDK`need | |||||
as well but can otherwise be omitted. | |||||
This is an example command for a default build with no disabled dependencies | |||||
(the paths needs to be adapted to match your installation): | |||||
export ANDROID_SDK=${HOME}/Android/Sdk | |||||
export ANDROID_NDK=${ANDROID_SDK}/ndk-bundle | |||||
export ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin | |||||
export ANDROID_API_LEVEL=28 | |||||
make build-android-aarch64 | |||||
### Other documentation | ### Other documentation | ||||
- [description.md](description.md): General description of the depends system | - [description.md](description.md): General description of the depends system | ||||
- [packages.md](packages.md): Steps for adding packages | - [packages.md](packages.md): Steps for adding packages | ||||
Have you tested at least some of these or are we just backporting this as-is? From the stack, it looks like only 28 has been explicitly tested.