cmake_minimum_required(VERSION 3.4.1)
set(COMMON_DIR ${PROJECT_DIR}/src/main/cpp/common)
set(TOOLKIT_DIR ${PROJECT_DIR}/src/main/cpp/toolkit)
set(LIBYUV_DIR ${TOOLKIT_DIR}/libyuv/libs)
set(LIBYUV_INCLUDE_DIR ${LIBYUV_DIR}/include)
include_directories(${COMMON_DIR}
${LIBYUV_INCLUDE_DIR}
${TOOLKIT_DIR})
link_directories(${LIBYUV_DIR}/${ANDROID_ABI})
add_library(Toolkits
SHARED
${TOOLKIT_DIR}/jni_interface.cpp)
if( ${ANDROID_ABI} MATCHES "armeabi-v7a" )
message(${ANDROID_ABI},当前启用neon设置)
endif(${ANDROID_ABI} MATCHES "armeabi-v7a")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_JNI_LOG=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DANDROID_STL=gnustl_static")
set(CMAKE_VERBOSE_MAKEFILE on)
target_link_libraries(Toolkits yuv)
target_link_libraries(Toolkits log)
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。