summaryrefslogtreecommitdiff
path: root/Modules/Platform/Android-Determine.cmake
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-10-27 15:08:00 -0700
committerHaibo Huang <hhb@google.com>2020-10-29 17:52:41 -0700
commit707a06761fbceba35bf52d943a8fab2c76e79717 (patch)
tree85c9723b6c5329ebae10cd6a1a38dc7945e4c757 /Modules/Platform/Android-Determine.cmake
parent32d369aa7049c4921d3c35ca8097bc0485866be6 (diff)
downloadcmake-707a06761fbceba35bf52d943a8fab2c76e79717.tar.gz
Android: add NDK hooks
This change adds hooks to key Android support files, so that NDK can inject information or change cmake behaviors.
Diffstat (limited to 'Modules/Platform/Android-Determine.cmake')
-rw-r--r--Modules/Platform/Android-Determine.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index f7d8d1332a..3206c83fc6 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -5,6 +5,12 @@
# This module detects platform-wide information about the Android target
# in order to store it in "CMakeSystem.cmake".
+# Include the NDK hook.
+# It can be used by NDK to inject necessary fixes for an earlier cmake.
+if(CMAKE_ANDROID_NDK)
+ include(${CMAKE_ANDROID_NDK}/build/cmake/hooks/pre/Android-Determine.cmake OPTIONAL)
+endif()
+
# Support for NVIDIA Nsight Tegra Visual Studio Edition was previously
# implemented in the CMake VS IDE generators. Avoid interfering with
# that functionality for now.
@@ -519,3 +525,9 @@ endif()
message(STATUS "Android: Targeting API '${CMAKE_SYSTEM_VERSION}' with architecture '${CMAKE_ANDROID_ARCH}', ABI '${CMAKE_ANDROID_ARCH_ABI}', and processor '${CMAKE_SYSTEM_PROCESSOR}'")
cmake_policy(POP)
+
+# Include the NDK hook.
+# It can be used by NDK to inject necessary fixes for an earlier cmake.
+if(CMAKE_ANDROID_NDK)
+ include(${CMAKE_ANDROID_NDK}/build/cmake/hooks/post/Android-Determine.cmake OPTIONAL)
+endif()