cmake/Modules/Platform/Android.cmake

25 lines
702 B
CMake
Raw Normal View History

2015-04-27 22:25:09 +02:00
include(Platform/Linux)
2016-10-30 18:24:19 +01:00
set(ANDROID 1)
2020-08-30 11:54:41 +02:00
# Natively compiling on an Android host doesn't need these flags to be reset.
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
return()
endif()
2019-11-11 23:01:05 +01:00
# Conventionally Android does not use versioned soname
# But in modern versions it is acceptable
if(NOT DEFINED CMAKE_PLATFORM_NO_VERSIONED_SONAME)
set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
endif()
2015-04-27 22:25:09 +02:00
# Android reportedly ignores RPATH, and we cannot predict the install
# location anyway.
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
# Nsight Tegra Visual Studio Edition takes care of
# prefixing library names with '-l'.
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
set(CMAKE_LINK_LIBRARY_FLAG "")
endif()