diff --git a/CMakeLists.txt b/CMakeLists.txt index edccfae70..83753f3d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,8 +200,7 @@ if(BUILD_TESTS) # that has builtin Android support -- Gradle uses 3.6 so this will nicely # work in both cases. if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK) - list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/toolchains/modules/") - include(UseAndroid) + include(${PROJECT_SOURCE_DIR}/toolchains/modules/UseAndroid.cmake) endif() endif() diff --git a/doc/platforms-android.dox b/doc/platforms-android.dox index 4ad0a8ea3..9cd5e1401 100644 --- a/doc/platforms-android.dox +++ b/doc/platforms-android.dox @@ -215,16 +215,14 @@ Gradle. used for the final release builds. Download contents of the toolchains repository from https://github.com/mosra/toolchains -or add it as a Git submodule, add its module path to `CMAKE_MODULE_PATH` and -include the `UseAndroid` module. Wrapping it in a check for presence of -`CMAKE_ANDROID_NDK` will make it possible to have the pure CMake and a Gradle -build coexist --- because Gradle internally uses CMake 3.6 which doesn't know -about `CMAKE_ANDROID_NDK` yet. +or add it as a Git submodule and include the `UseAndroid` module from there. +Wrapping it in a check for presence of `CMAKE_ANDROID_NDK` will make it +possible to have the pure CMake and a Gradle build coexist --- because Gradle +internally uses CMake 3.6 which doesn't know about `CMAKE_ANDROID_NDK` yet. @code{.cmake} if(CORRADE_TARGET_ANDROID AND CMAKE_ANDROID_NDK) - list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/toolchains/modules/") - include(UseAndroid) + include(${PROJECT_SOURCE_DIR}/toolchains/modules/UseAndroid.cmake) endif() @endcode