# Sets the minimum version of CMake required to build the native
# library. You should either keep the default value or only pass a
# value of 3.4.0 or lower.
cmake_minimum_required(VERSION 3.4.1)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds it for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
test_jni
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# Associated headers in the same location as their source
# file are automatically included.
src/main/jni/Hello.c )
# Searches for a specified prebuilt library and stores the path as a
# variable. Because system libraries are included in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log )
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in the
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
test_jni
# Links the target library to the log library
# included in the NDK.
${log-lib} )
Android Studio JNI-CMake开发Demo
需积分: 10 159 浏览量
2016-11-09
11:13:31
上传
评论
收藏 95KB ZIP 举报
北极星辰_
- 粉丝: 5
- 资源: 8
最新资源
- wp2787778-map-wallpaper.jpg
- 基于Javascript的杜王町打工人仓库管理系统设计源码 - 杜王町打工人的仓库
- 基于C#的报销材料合并工具设计源码 - 报账材料合并
- 基于Java的驾校一点通后端服务设计源码 - jiaxiaoServer
- 基于Java的实验室仪器设备管理系统后端设计源码 - houduan
- Screenshot_2024-05-29-01-03-40-499_com.tencent.mm.jpg
- 素材(美女、自拍)-.zip
- 基于Vue和Javascript的自动化接口文档生成工具设计源码 - 自动化接口生成文档
- com.miHoYo.ys.bilibili.apk
- 基于51单片机+共阴极数码管设计00-99计数器Proteus仿真+软件程序C源代码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈