android ndk项目使用静态库

先在项目目录下创建一个lib文件夹,再将.a文件放进去,然后在CMakelist.txt中添加如下配置

set(HOME_BASE_REL "../../../../")
get_filename_component(HOME_BASE ${HOME_BASE_REL} REALPATH)
message(${HOME_BASE})
set(A_LIB_DIR ${HOME_BASE}/lib)


target_link_libraries( # Specifies the target library.
        ${A_LIB_DIR}/libxxx.a
        )

你可能感兴趣的:(android ndk项目使用静态库)