- CMake >= 3.7.1
- Android NDK
# Clone repository with dependencies
$ git clone https://gitlab.com/barsoosayque/libgdx-oboe.git --recurse-submodules
$ cd libgdx-oboe
# You should generate a ffmpeg/libavutil/avconfig.h file
# either by running sh build_ffmepg.sh --init (more of it down below),
# or just simply by writing it :^)
# cat <<EOF > library/dependencies/ffmpeg/libavutil/avconfig.h
# /* Generated by ffconf */
# #ifndef AVUTIL_AVCONFIG_H
# #define AVUTIL_AVCONFIG_H
# #define AV_HAVE_BIGENDIAN 0
# #define AV_HAVE_FAST_UNALIGNED 0
# #endif /* AVUTIL_AVCONFIG_H */
# EOF
# Build !
$ ./gradlew :library:build
And you got yourself two AAR-files in library/build/outputs/aar
.
Shared library files for FFmpeg are distributed prebuilt, so this section is mostly for the future development of the library.
Note, that building those *.so files only works on Unix systems because of the configure scripts. There is no point to use some cross-platform tools to build the library, therefore you can just run shell script to build the library:
$ cd library
$ sh build_ffmpeg.sh
Hopefully, this will build you a bunch of new *.so libs in build/libs
.
If you want to update library libs
directory with prebuilt libraries, you can pass --update
flag to the build script after you performed a build.
A few notes:
- Requires NDK >= r19 as it is uses it's clang toolchains.
- Environmental variable
ANDROID_HOME
should be defined and must be absolute. - Scrip also support
--clear
flag to wipe any build folders before starting a build.