Browse Source

doc: document android_create_apk() resource and asset copying.

pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
3982458892
  1. 4
      doc/changelog.dox
  2. 16
      doc/platforms-android.dox

4
doc/changelog.dox

@ -1056,6 +1056,10 @@ See also:
- Fixed most remaining warnings on MSVC, in particular those related to - Fixed most remaining warnings on MSVC, in particular those related to
"conversion from T to void * of greater size" (see "conversion from T to void * of greater size" (see
[mosra/magnum#544](https://github.com/mosra/magnum/issues/544)). [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 @subsection changelog-latest-bugfixes Bug fixes

16
doc/platforms-android.dox

@ -285,6 +285,22 @@ if(CMAKE_ANDROID_NDK)
endif() endif()
@endcode @endcode
Besides packing the main library, the function can also copy resources and
assets:
@code{.cmake}
android_create_apk(<target> <manifest>
[RESOURCE_DIRECTORY <res>]
[ASSET_DIRECTORY <assets>])
@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 @subsection platforms-android-apps-gradle Using Gradle
Besides plain CMake and Gradle it's also possible to use the classic Besides plain CMake and Gradle it's also possible to use the classic

Loading…
Cancel
Save