summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android.cmake
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-10-27 22:08:00 (GMT)
committerHaibo Huang <hhb@google.com>2020-10-30 00:52:41 (GMT)
commit707a06761fbceba35bf52d943a8fab2c76e79717 (patch)
tree85c9723b6c5329ebae10cd6a1a38dc7945e4c757 /Modules/Platform/Android.cmake
parent32d369aa7049c4921d3c35ca8097bc0485866be6 (diff)
downloadCMake-707a06761fbceba35bf52d943a8fab2c76e79717.zip
CMake-707a06761fbceba35bf52d943a8fab2c76e79717.tar.gz
CMake-707a06761fbceba35bf52d943a8fab2c76e79717.tar.bz2
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.cmake')
-rw-r--r--Modules/Platform/Android.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake
index 80d81aa..2a1a7a3 100644
--- a/Modules/Platform/Android.cmake
+++ b/Modules/Platform/Android.cmake
@@ -1,3 +1,9 @@
+# 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.cmake OPTIONAL)
+endif()
+
include(Platform/Linux)
set(ANDROID 1)
@@ -96,3 +102,9 @@ if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED)
list(APPEND CMAKE_SYSTEM_PROGRAM_PATH "${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/bin")
endif()
+
+# 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.cmake OPTIONAL)
+endif()