mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-26 10:30:20 +08:00
[cmake]: Fix ndk r10d compile error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I64fcf77e7adf13702f98d5d7735338846faff843
This commit is contained in:
@@ -74,7 +74,7 @@ FOUND_NDK=0
|
||||
if [ -z "$ANDROID_NDK" ]; then
|
||||
# try find ndk path in CMakeCache.txt
|
||||
if [ -f "CMakeCache.txt" ]; then
|
||||
ANDROID_NDK=`grep ANDROID_NDK CMakeCache.txt | awk -F '=' '{ print $2 }'`
|
||||
ANDROID_NDK=`grep ANDROID_NDK\: CMakeCache.txt | awk -F '=' '{ print $2 }'`
|
||||
|
||||
if [ -d "${ANDROID_NDK}" ]; then
|
||||
echo "use android ndk from CMakeCache.txt : ${ANDROID_NDK}"
|
||||
|
||||
@@ -86,7 +86,12 @@ set_target_properties(osal PROPERTIES FOLDER "osal")
|
||||
if(ANDROID)
|
||||
add_definitions(-static)
|
||||
# in Android pthread is in libc, also need liblog
|
||||
target_link_libraries(osal log m)
|
||||
# Android 14 requires libc++ not libstdc++
|
||||
if("${ANDROID_STL}" STREQUAL "c++_static")
|
||||
target_link_libraries(osal log m)
|
||||
else()
|
||||
target_link_libraries(osal log stdc++ m)
|
||||
endif()
|
||||
endif(ANDROID)
|
||||
|
||||
# unit test
|
||||
|
||||
Reference in New Issue
Block a user