mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-02 10:01:12 +00:00
Add instructions about buiding for Android to README.md
This commit is contained in:
parent
3b75b684a1
commit
01cd5ae377
22
README.md
22
README.md
@ -108,6 +108,28 @@ See [the wiki]
|
||||
(https://github.com/libgit2/libgit2/wiki/Building-libgit2-on-Windows)
|
||||
for more detailed instructions.
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
Extract toolchain from NDK using, `make-standalone-toolchain.sh` script.
|
||||
Optionaly, crosscompile and install OpenSSL inside of it. Then create CMake
|
||||
toolchain file that configures paths to your crosscompiler (substitude `{PATH}`
|
||||
with full path to the toolchain):
|
||||
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
SET(CMAKE_SYSTEM_VERSION Android)
|
||||
|
||||
SET(CMAKE_C_COMPILER {PATH}/bin/arm-linux-androideabi-gcc)
|
||||
SET(CMAKE_CXX_COMPILER {PATH}/bin/arm-linux-androideabi-g++)
|
||||
SET(CMAKE_FIND_ROOT_PATH {PATH}/sysroot/)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
Add `-DCMAKE_TOOLCHAIN_FILE={pathToToolchainFile} -DANDROID=1` to cmake command
|
||||
when configuring.
|
||||
|
||||
Language Bindings
|
||||
==================================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user