diff options
author | Haibo Huang <hhb@google.com> | 2020-10-27 22:08:00 (GMT) |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2020-10-30 00:52:41 (GMT) |
commit | 707a06761fbceba35bf52d943a8fab2c76e79717 (patch) | |
tree | 85c9723b6c5329ebae10cd6a1a38dc7945e4c757 /Modules/Platform/Android-Clang.cmake | |
parent | 32d369aa7049c4921d3c35ca8097bc0485866be6 (diff) | |
download | CMake-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-Clang.cmake')
-rw-r--r-- | Modules/Platform/Android-Clang.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake index 160eada..44d48cd 100644 --- a/Modules/Platform/Android-Clang.cmake +++ b/Modules/Platform/Android-Clang.cmake @@ -7,6 +7,12 @@ if(__ANDROID_COMPILER_CLANG) endif() set(__ANDROID_COMPILER_CLANG 1) +# 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-Clang.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. Later we may try to integrate this. @@ -57,3 +63,9 @@ macro(__android_compiler_clang lang) set(_ANDROID_STL_NOSTDLIBXX 1) endif() endmacro() + +# 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-Clang.cmake OPTIONAL) +endif() |