Skip to content
Snippets Groups Projects
Commit 6205f179 authored by Brad King's avatar Brad King
Browse files

Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically

If the toolchain file or cache does not set this, enable it
automatically based on the Android API version.  Versions 16
and above expect position independent code.

Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of
hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI.
This allows CMake to use `-fpie` or `-fPIE` as needed when sources
are meant for executables, and `-fpic` or `-fPIC` for other sources.
parent 295c8efa
No related branches found
No related tags found
No related merge requests found
Showing
with 5 additions and 35 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment