[android]: use static library in android rather than share library

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@898 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-06-08 08:17:08 +00:00
parent 0792547b10
commit b1066150e9
2 changed files with 5 additions and 4 deletions

View File

@@ -1301,10 +1301,10 @@ endif()
# add crt object to executable link list for Android SDK build # add crt object to executable link list for Android SDK build
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
set( ANDROID_CRT_BEGIN "${ANDROID_SYSROOT}/usr/lib/crtbegin_dynamic.o") #set( ANDROID_CRT_BEGIN "${ANDROID_SYSROOT}/usr/lib/crtbegin_dynamic.o")
set( ANDROID_CRT_END "${ANDROID_SYSROOT}/usr/lib/crtend_android.o") #set( ANDROID_CRT_END "${ANDROID_SYSROOT}/usr/lib/crtend_android.o")
set( CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${ANDROID_CRT_BEGIN} ${ANDROID_CRT_END}" ) #set( CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${ANDROID_CRT_BEGIN} ${ANDROID_CRT_END}" )
set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_CRT_BEGIN} ${ANDROID_CRT_END}" ) #set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_CRT_BEGIN} ${ANDROID_CRT_END}" )
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------

View File

@@ -32,6 +32,7 @@ add_library(osal STATIC
) )
if(ANDROID) if(ANDROID)
add_definitions(-static)
# in Android pthread is in libc, also need liblog # in Android pthread is in libc, also need liblog
target_link_libraries(osal log stdc++ m c ) target_link_libraries(osal log stdc++ m c )
else() else()