diff --git a/doc/changelog.dox b/doc/changelog.dox index e0f247584..a747b703f 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -1056,6 +1056,10 @@ See also: - Fixed most remaining warnings on MSVC, in particular those related to "conversion from T to void * of greater size" (see [mosra/magnum#544](https://github.com/mosra/magnum/issues/544)). +- The @cb{.cmake} android_create_apk() @ce CMake function gained an ability + to copy resources and assets to the APK. See @ref platforms-android-apps-cmake "the corresponding Android platform documentation" + and [mosra/toolchains#10](https://github.com/mosra/toolchains/pull/10) for + more information @subsection changelog-latest-bugfixes Bug fixes diff --git a/doc/platforms-android.dox b/doc/platforms-android.dox index e6dba144c..7d5dc0aa5 100644 --- a/doc/platforms-android.dox +++ b/doc/platforms-android.dox @@ -285,6 +285,22 @@ if(CMAKE_ANDROID_NDK) endif() @endcode +Besides packing the main library, the function can also copy resources and +assets: + +@code{.cmake} +android_create_apk( + [RESOURCE_DIRECTORY ] + [ASSET_DIRECTORY ]) +@endcode + +The optional `RESOURCE_DIRECTORY` and `ASSET_DIRECTORY` arguments take relative +or absolute paths to directories containing resources (usually named `res/`) +and assets (usually named `assets/`). Both options track file dependencies, so +the APK gets repacked when any files in the directories change contents, are +added or removed. CMake before 3.12 checks the directories only during CMake +runs, on newer versions at every incremental build. + @subsection platforms-android-apps-gradle Using Gradle Besides plain CMake and Gradle it's also possible to use the classic