Commit graph

5 commits

Author SHA1 Message Date
Robert Müller 930836f349 Split compile_source function for readability
Split the `compile_source` function into `compile_source_android` and `compile_source_webasm` instead of using a parameter to switch between the functionality.
2024-05-23 20:43:53 +02:00
ChillerDragon c75584406a Use shfmt as formatter for shell scripts 2024-05-23 08:05:00 +08:00
Robert Müller cdbe1f775a Various fixes/improvements to Android building scripts
Use [cargo-ndk](https://github.com/bbqsrc/cargo-ndk) to configure cargo for building with the Android NDK. The output of `cargo ndk` is written to a subfolder for the target triplet, which cannot be changed by parameter. Therefore, the `CARGO_BUILD_DIR` is changed to this subfolder for the Android build, so the build process can find the output.

Use `$HOME` instead of `~` because cargo-ndk cannot correctly access the folder otherwise (will fail with error message indicating it could not determine the NDK version).

Add `DDNET_TEST_NO_LINK=ON` CMake argument, to fix Rust linking errors with tests.

Add additional CMake arguments to specify system name, API version and NDK location. Upgrade to Android API 34.

Use `nproc` instead of `32` threads for building.
2024-05-21 17:36:47 +02:00
Jupeyy bb1ed45c3d Emscripten support 2022-03-25 12:42:18 +01:00
Jupeyy e02ebca2c9 Rename lib generation scripts 2022-03-25 11:46:32 +01:00
Renamed from scripts/android/cmake_lib_compile.sh (Browse further)