This is my fork of libgit2.
If anyone else wants to use this fork, keep in mind that there is a dangerous workaround in src/libgit2/repository.c
. To revert it, checkout b85ce6a.
- Read the warning above!
- If you haven't already, download the NDK and extract it
- Make sure
CMAKE_ANDROID_NDK
in the toolchain file is set to the NDK directory - If you want to, change the android API version (
CMAKE_SYSTEM_VERSION
) or architecture (CMAKE_ANDROID_ARCH_ABI
) in that toolchain file - Set the env variable
ANDROID_NDK_ROOT
to your NDK directory and build opensslcd openssl PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH ./Configure android-arm64 -D__ANDROID_API__=34 # if you need to, here you can change the API verson make cd ..
- Run cmake using the toolchain file
mkdir build cd build cmake -DCMAKE_TOOLCHAIN_FILE=../android-toolchain.cmake ..
- Start the build and hope for the best
cmake --build .