Modernize CMake files
This commit is contained in:
parent
fc02cf004a
commit
ee08e18726
26 changed files with 259 additions and 275 deletions
|
@ -810,20 +810,16 @@ else()
|
|||
endif()
|
||||
set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
|
||||
set( CMAKE_ANDROID_API ${ANDROID_NATIVE_API_LEVEL} )
|
||||
if( CMAKE_VERSION VERSION_GREATER "2.8" )
|
||||
list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
|
||||
set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
|
||||
endif()
|
||||
list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
|
||||
set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
|
||||
endif()
|
||||
unset( __levelIdx )
|
||||
|
||||
|
||||
# remember target ABI
|
||||
set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE )
|
||||
if( CMAKE_VERSION VERSION_GREATER "2.8" )
|
||||
list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME} )
|
||||
set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME}} )
|
||||
endif()
|
||||
list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME} )
|
||||
set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME}} )
|
||||
|
||||
|
||||
# runtime choice (STL, rtti, exceptions)
|
||||
|
@ -1137,9 +1133,6 @@ if( NOT CMAKE_C_COMPILER )
|
|||
endif()
|
||||
|
||||
set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" )
|
||||
if( CMAKE_VERSION VERSION_LESS 2.8.5 )
|
||||
set( CMAKE_ASM_COMPILER_ARG1 "-c" )
|
||||
endif()
|
||||
if( APPLE )
|
||||
find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool )
|
||||
if( NOT CMAKE_INSTALL_NAME_TOOL )
|
||||
|
@ -1443,7 +1436,7 @@ if( MIPS AND BUILD_WITH_ANDROID_NDK AND ANDROID_NDK_RELEASE STREQUAL "r8" )
|
|||
endif()
|
||||
|
||||
# pie/pic
|
||||
if( NOT (ANDROID_NATIVE_API_LEVEL LESS 16) AND (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE) AND (CMAKE_VERSION VERSION_GREATER 2.8.8) )
|
||||
if( NOT (ANDROID_NATIVE_API_LEVEL LESS 16) AND (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE))
|
||||
set( CMAKE_POSITION_INDEPENDENT_CODE TRUE )
|
||||
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
|
||||
else()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue