android CMakeLists
https://developer.android.google.cn/studio/projects/configure-cmake
https://blog.csdn.net/songmingzhan/article/details/80720903
# 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. or lower. cmake_minimum_required(VERSION 3.4.) # 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(samba_client
SHARED
src/main/cpp/jni_helper/JniHelper.cc
src/main/cpp/jni_helper/JavaClassCache.cc
src/main/cpp/samba_client/SambaClient.cc
src/main/cpp/credential_cache/CredentialCache.cc
) include_directories(src/main/cpp) set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++0x -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie") # 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. #set(libfolder "${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}")
set(libfolder "${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}")
add_library(libsmbclient
SHARED
IMPORTED)
set_target_properties(libsmbclient
PROPERTIES IMPORTED_LOCATION
${libfolder}/libsmbclient.so) target_link_libraries(samba_client ${log-lib} libsmbclient)
android CMakeLists的更多相关文章
- Android Studio Linking an external C++ project 时候 报Invalid file name. Expected: CMakeLists.txt
Android Studio 右键Linking an external C++ project 时候 报Invalid file name. Expected: CMakeLists.txt错误 查 ...
- Android下Native的so编译:使用cmakelists.txt
android studio的CMakeLists.txt写好后,在Studio中编译没问题,在命令编译时则需要配置很多参数才能成功 示例CMakeLists.txt文件: cmake_minimum ...
- Android Studio NDK 开发 问题记录
Android NDK 开发 问题解决 编译:找不到gles3库 使用旧的编译方式,写Android.mk 进行编译.报错如下 gles3/gl3.h no such file or director ...
- Android Studio22-NDK-LLDB调试
Android Studio2.2更好的支持NDK开发,并可以像开发java一样的DEBUG程序,不需要添加gradle-experimental插件,就可调试代码! 一,下载 NDK 和构建工具 要 ...
- ubuntu14.04 + cocos2d-x-3.6 + eclipse发布android
cocos2d-x-2.2.6版本 :http://www.cnblogs.com/weishuan/p/4698470.html 接下来是3.6了 ,准备好下面四个东东,我把这些都放在XXX/App ...
- cocos2d-x 3.0rc开发指南:Windows下Android环境搭建
安装工具 1. 配置JDK JDK下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html 本人的系统是Win7 ...
- Android -- Android下的NDK开发(一)
1,NDK是什么?为什么要进行NDK开发? NDK:Native Development Kit.Android应用运行在Dalvik虚拟机中.NDK允许开发人员使用本地代码语言(例如C和C++)实现 ...
- 实时Android语音对讲系统架构
本文属于Android局域网内的语音对讲项目系列,<通过UDP广播实现Android局域网Peer Discovering>实现了局域网内的广播及多播通信,本文将重点说明系统架构,音频信号 ...
- Android开发随手记
本文是作者在Android开发实践中的随手速记,记录一些小问题的解决方案和注意事项,持续更新. 以下是速记内容,若有不严谨的地方,望小伙伴们指出. 1.Module 不生成R文件,可尝试取消对该Mod ...
随机推荐
- myeclipse乱码/GBK只支持中文
Windows>>Pereferences>>General>Editors>>Spelling>>Encoding选项下选择other,然后输入 ...
- 1.5神经网络可视化显示(matplotlib)
神经网络训练+可视化显示 #添加隐层的神经网络结构+可视化显示 import tensorflow as tf def add_layer(inputs,in_size,out_size,activa ...
- 老师的blog整理
python基础部分: 宝哥blog: https://www.cnblogs.com/guobaoyuan/ 开哥blog: https://home.cnblogs.com/u/Neeo 女神笔记 ...
- 系统之锹sysdig:Linux服务器监控和排障利器
当你需要追踪某个进程产生和接收的系统调用时,首先浮现在你脑海中的是什么?你可能会想到strace,那么你是对的.你会使用什么样的命令行工具来监控原始网络通信呢?如果你想到了tcpdump,你又作出了一 ...
- iOS常用基础框架
一,简述 1.1,IOS操作系统的层次架构 iOS为应用程序开发提供了许多可使用的框架,并构成IOS操作系统的层次架构,分为四层,从上到下依次为:Cocoa Touch Layer( ...
- Cocos2d比较好的博客
1 .http://blog.csdn.net/bill_man/article/details/7202458 学习笔记 2.http://cocos2d-x.org/ 官网 3.http://ww ...
- nginx之配置proxy_set_header
win10客户端请求web服务,win10的ip:192.168.223.1 nginx作为反向代理服务器:192.168.223.136 nginx作为后端web服务器:192.168.223.13 ...
- Qt Creator 4.3.0,Quick Designer里面也看以同时看到和编辑qml code了(Qt5.9的配套IDE)
作者:Summer Fang链接:https://www.zhihu.com/question/60486611/answer/177584284来源:知乎著作权归作者所有.商业转载请联系作者获得授权 ...
- Unity3D中使用Profiler精确定位性能热点的优化技巧
本文由博主(SunboyL)原创,转载请注明出处:http://www.cnblogs.com/xsln/p/BeginProfiler.html 简介 在使用Profiler定位代码的性能热点时,很 ...
- host文件常用地址
#+UPDATE_TIME 2016-02-16 19:52:05 UTC+8#+MESSAGE#################################################### ...