# Sets the minimum version of CMake required to build your native library.
# This ensures that a certain set of CMake features is available to
# your build.
cmake_minimum_required(VERSION 3.21.1)
project(MyTV)
# Specifies a path to native header files.
include_directories(src/main/cpp/include)
if (IS_SO_BUILD)
# Specifies a library name, specifies whether the library is STATIC or
# SHARED, and provides relative paths to the source code. You can
# define multiple libraries by adding multiple add_library() commands,
# and CMake builds them for you. When you build your app, Gradle
# automatically packages shared libraries with your APK.
add_library( # Specifies the name of the library.
native
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
src/main/cpp/native.c)
# 设置编译输出路径
set_target_properties(
native
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}
)
else ()
add_library(
nothing
SHARED
src/main/cpp/nothing.c)
add_library(native
SHARED
IMPORTED)
set_target_properties( # Specifies the target library.
native
# Specifies the parameter you want to define.
PROPERTIES IMPORTED_LOCATION
# Provides the path to the library you want to import.
${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}/libnative.so)
endif ()
#add_library(libssl
# STATIC
# IMPORTED)
#
#set_target_properties( # Specifies the target library.
# libssl
#
# # Specifies the parameter you want to define.
# PROPERTIES IMPORTED_LOCATION
#
# # Provides the path to the library you want to import.
# ${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}/libssl.so)
#
#add_library(libcrypto
# SHARED
# IMPORTED)
#
#set_target_properties( # Specifies the target library.
# libcrypto
#
# # Specifies the parameter you want to define.
# PROPERTIES IMPORTED_LOCATION
#
# # Provides the path to the library you want to import.
# ${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}/libcrypto.so)
add_library(libssl
STATIC
IMPORTED)
set_target_properties( # Specifies the target library.
libssl
# Specifies the parameter you want to define.
PROPERTIES IMPORTED_LOCATION
# Provides the path to the library you want to import.
${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}/libssl.a)
add_library(libcrypto
STATIC
IMPORTED)
set_target_properties( # Specifies the target library.
libcrypto
# Specifies the parameter you want to define.
PROPERTIES IMPORTED_LOCATION
# Provides the path to the library you want to import.
${CMAKE_SOURCE_DIR}/src/main/cpp/${ANDROID_ABI}/libcrypto.a)
find_library( # Defines the name of the path variable that stores the
# location of the NDK library.
log-lib
# Specifies the name of the NDK library that
# CMake needs to locate.
log)
if (IS_SO_BUILD)
# Links your native library against one or more other native libraries.
target_link_libraries( # Specifies the target library.
native
libssl
libcrypto
${log-lib})
else ()
target_link_libraries( # Specifies the target library.
nothing
libssl
libcrypto
native
${log-lib})
endif ()
博士僧小星
- 粉丝: 2436
- 资源: 5997
最新资源
- 基于K-means算法的光伏曲线聚类研究 MATLAB 代码研究大量随机场景下光伏序列聚类与削减问题,首先,生成大量光伏随机场景,其次,采用的是较为基础的K-means算法,经过matlab求解后,代
- 三菱Fx3u程序,自动检测包装机 该程序六个电机,plc本体脉冲控制3个轴,3个1pg控制 程序内包括伺服定位,手自动切,功能快的使用,可作为模板程序,很适合新手
- 西门子新一代伺服驱动系统SINAMICS S200 PN驱动器连接的电机均为绝对值编码器类型,在EPOS控制模式下有主动回零、被动回零、设置参考点及绝对值编码器校准几种回参考点方式
- Linux下使用v4l2-ctl命令检查摄像头及相关音视频设备硬件特性
- sqlserver-trigger-socket通信
- 文件下载,无特殊意义,无需纠结
- 法奥Linux下的VisualCode配置C++SDK
- 2022级嵌入式Linux期末课程设计-选题参考.rar
- 基于STM32F103的多摩川绝对值磁编码器通讯方案 包含:原理图,PCB,源码,多摩川协议手册
- 成都链家二手房.zip
- arm-linux-gcc-4.5.1-v6-vfp-20120301.7z
- S7-1200 PLC 连接 SINAMICS S200 PN伺服驱动系统
- 数据结构期末作业:基于Python的zzu校园导航.zip
- 51单片机数控可调稳压电源proteus仿真,可调范围为3-24V,可以矩阵键盘直接设置输出电压,也可以步进0.1V设置输出电压,1602lcd显示设置值与实际输出值
- DLLDirectX文件修复工具
- BC文件比较工具.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈