android.cmake 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #[=======================================================================[.rst:
  2. Android
  3. -------
  4. This file contains functions for options and configuration for targeting the
  5. Android platform
  6. Configuration of the Android toolchain is done using toolchain files,
  7. CMakePresets, or variables on the command line.
  8. The `Android SDK`_ provides toolchain files to help with configuration.
  9. CMake has its own `built-in support`_ for cross compiling to the
  10. Android platforms.
  11. .. warning::
  12. Android does not support or test the CMake built-in workflow, recommend
  13. using their toolchain file.
  14. .. _Android SDK:https://developer.android.com/ndk/guides/cmake
  15. .. _built-in support:https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android
  16. There is further information and examples in the doc/cmake.rst file.
  17. ]=======================================================================]
  18. function( android_options )
  19. # Android Options
  20. endfunction()
  21. function( android_generate )
  22. target_compile_definitions(${TARGET_NAME}
  23. PUBLIC
  24. ANDROID_ENABLED
  25. UNIX_ENABLED
  26. )
  27. common_compiler_flags()
  28. endfunction()