summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Android: Fix search for binutilsHaibo Huang2021-03-301-50/+0
| | | | | | | | Set `CMAKE_SYSTEM_PROGRAM_PATH` in `Platform/Android-Initialize` instead of `Platform/Android` so it can be used in `CMakeFindBinUtils`. Also add the names `llvm-strip` and `llvm-ranlib` for the corresponding tools.
* Android: restructure android search pathsHaibo Huang2020-11-091-32/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Set CMAKE_FIND_ROOT_PATH unconditionally. Revise the implementation from commit a7f41a7ee4 (Android: Fix find_* search order within NDK for unified toolchains, 2020-10-13). In the old implementation, if people set CMAKE_FIND_ROOT_PATH, CMAKE_ANDROID_NDK won't be added to find root. And all paths added to CMAKE_SYSTEM_*_PATH below will be rerooted to the user specified root. 2. Add api level specific library path to CMAKE_SYSTEM_PREFIX_PATH. As the discussion in [1], some people want the paths added by UnixPaths.cmake. They install their libraries according to GNUInstallDirs [2]. As a result, we cannot clear CMAKE_SYSTEM_PREFIX_PATH. It includes /usr so no matter what we specify in CMAKE_SYSTEM_LIBRARY_PATH, /usr/lib/<arch> will be searched first. The author also pointed out a way to solve this issue [3]. In addition to other paths, CMake also searches <root>/<prefix> [4]. So we can add the API specific lib path to the beginning of CMAKE_SYSTEM_PREFIX_PATH, to have it searched first. [1] https://android-review.googlesource.com/c/platform/ndk/+/1486800 [2] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html [3] https://github.com/android/ndk/issues/1179#issuecomment-613435081 [4] https://gitlab.kitware.com/cmake/cmake/-/blob/11425041f04fd0945480b8f9e9933d1549b93981/Source/cmSearchPath.cxx#L202
* Android: add NDK hooksHaibo Huang2020-10-301-0/+12
| | | | | This change adds hooks to key Android support files, so that NDK can inject information or change cmake behaviors.
* Android: Fix find_* search order within NDK for unified toolchainsHaibo Huang2020-10-231-0/+36
|
* Android: Root searches within the NDK for unified toolchainsHaibo Huang2020-10-231-0/+38
| | | | Set `CMAKE_FIND_ROOT_PATH_MODE_*` appropriately.
* Android: add support for native compilation, such as with the Termux appButta2019-10-151-0/+5
| | | | | | | | | The CMake support for Android assumes cross-compilation using the NDK, so stub out that Android NDK support and use the Linux support that's already invoked. Set CMAKE_HOST_SYSTEM_NAME to "Android", rather than "Linux". Issue: #19840
* Android: allow user to enable versioned sonameTom Yan2019-03-051-3/+5
|
* Android: Add `ANDROID` variable to indicate the targetBrad King2016-08-231-0/+2
| | | | | Allow projects to use `if(ANDROID)` to condition their Android-specific code paths.
* VS: Fix Tegra-Android platform linking of libraries by nameBrad King2014-09-301-0/+6
| | | | | | | Nsight Tegra Visual Studio Edition handles prefixing of library names with '-l' automatically, so teach the generator not to do so. Reported-by: Mourad Boufarguine <mourad@boufarguine.name>
* Add basic Android platform moduleBrad King2014-06-061-0/+9
| | | | | | | | | | | | | | | | | | Create a Platform/Android module that includes Platform/Linux since Android is based on Linux. Provide only the minimal settings needed to get builds with Android NDK toolchains to work. Disable use of RPATH since the Android loader ignores it and we cannot predict the install destination anyway. Android supports soname but shared library names must end in ".so" and we cannot represent the versioned names with associated symlinks on all host operating systems anyway. However, we do want the SONAME of library files to be set so that linking to them by path to the library file produces NEEDED entries with the soname and not the path. Add a new CMAKE_PLATFORM_NO_VERSIONED_SONAME setting to tell the cmTarget::GetLibraryNames method that not to use the VERSION or SOVERSION target properties in the soname.
* Revert "Modules: Add an Andriod platform file"Stephen Kelly2014-04-101-5/+0
| | | | | | | This reverts commit 77f06b145d57c4665ff5d71b89a70c54a009ad14. It may be re-added in the future when the requirements for that platform are better known and supported by CMake.
* Modules: Add an Andriod platform fileStephen Kelly2014-03-201-0/+5
It is much like Linux but has no SONAME or RPATH.