Android ndk cmakelist -
enter image description here cmakelist :---> cmake_minimum_required(version 3.4.1) set(distribution_dir ${cmake_source_dir}/../../../../distribution)
增加cpp动态共享库
add_library( image_compress shared src/main/cpp/compress_image.cpp )
增加so文件动态共享库,${android_abi}表示so文件的abi类型的路径
add_library(libjpeg shared imported) set_target_properties(libjpeg properties imported_location ${distribution_dir}/plus/lib/${android_abi}/libjpeg.so)
set(cmake_cxx_flags "${cmake_cxx_flags} -std=gnu++11")
增加include包含的路径
target_include_directories(image_compress private ${distribution_dir}/plus/include)
生成链接动态库
target_link_libraries( image_compress android ${log-lib} )
Comments
Post a Comment