This is the repository for third party of SuperGenius.
===================================
Pre-built libraries are available on the release page. The tags are named with the following convention:
${PLATFORM}-${BRANCH}-${BUILD_TYPE}
Where:
PLATFORMis Android, iOS, Linux, OSX or WindowsBUILD_TYPEis either Debug or Release
The master branch has the release versions, for development download from the develop branch to get the newest builds.
If you want to build thirdparty for yourself, you'll need to recursively checkout every submodule.
- CMake
- Perl
wallet-coredependency tools- Ruby
- Rust
bindgen(install withcargo install cbindgen)- WASM target (install with
rustup target add wasm32-unknown-emscripten) - On Mac don't use homebrew to install rust, use the recommended install procedure on the official website
clangorMSVCas a compiler- On Linux setting cc and c++ to clang might be needed (using
update-alternatives)
- On Linux setting cc and c++ to clang might be needed (using
- Ninja
- NDK, preferably version 27b
- Remember to set the environment variable
ANDROID_NDK_HOMEto point to the install path (.bash_profile/.bashrc/.zprofile etc.)export ANDROID_NDK_HOME=/path/to/android-ndk-27b
- Remember to set the environment variable
- Rust Android target
- Installable with
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
- Installable with
Note: we do not test cross-compiling for Android using Windows.
- Rust iOS target and toolchain
rustup toolchain install nightly-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-aarch64-apple-darwin
rustup target add aarch64-apple-iosIn the build directory, there'll be a folder for every supported platform, and inside each there will be a CMakeLists.txt file. To build, you must configure CMake using this platform-specific subdirectory and build from there.
Our convention is to create a subdirectory inside build/${PLATFORM}, called either Debug or Release, depending on the BUILD_TYPE. So to build the debug version for Linux, you would:
It is recommended that you enter into the build directory, i.e. Debug or Release, etc for ninja to work properly
cd build/Linux/Debug
cmake .. -CMAKE_BUILD_TYPE=Debug
cmake --build Debug --config Debug -jNinja is able to use parallel builds far better than CMake and picks up on # processors automatically.
cd build/Linux/Debug
cmake .. -CMAKE_BUILD_TYPE=Debug -G "Ninja"
ninjaSome CMake projects rely on having CMAKE_BUILD_TYPE set, so even if you're using a multi-config generator like Visual Studio, it is important to set it accordingly.
Another example, for Windows using release mode:
cd build/Windows
cmake -B Release -G "Visual Studio 17 2022" -A x64 -CMAKE_BUILD_TYPE=Release
cmake --build Release --config Release -jWhen building for Android, we expect each ABI to have its own subdirectory. You need to configure the ABI to be built. The ABIs supported are:
armeabi-v7afor Android x86arm64-v8afor Android arm64x86_64for Android emulator
Example for Android arm64:
cd build/Android
mkdir Debug && cd Debug
cmake -S .. -B arm64-v8a -CMAKE_BUILD_TYPE=Debug -DANDROID_ABI=arm64-v8a
cmake --build arm64-v8a --config Debug -jOr when using Ninja
cd build/Android
mkdir -p Debug/arm64-v8a && cd Debug/arm64-v8a
cmake .. -CMAKE_BUILD_TYPE=Debug -DANDROID_ABI=arm64-v8a -G "Ninja"
ninjaWhen building for Apple platforms, you'll need to configure the project with the PLATFORM variable set to one of these values:
OS64for iOSMACfor macOS x86MAC_ARM64for macOS arm64MAC_UNIVERSALfor macOS arm64 + x86, (Default for Mac/OSX)
Example for macOS x86:
cd build/OSX
cmake -B Release -CMAKE_BUILD_TYPE=Release -DPLATFORM=MAC
cmake --build Release --config Release -jAnd when using Ninja
cd build/OSX
mkdir Release
cd Release
cmake .. -CMAKE_BUILD_TYPE=Release -G "Ninja" # default is MAC_UNIVERSAL
ninja