cmake

Android 图形显示系统(十四)OpenGLES 纯Native实现PNG图片贴图

做~自己de王妃 提交于 2020-01-21 09:22:35
文章目录 如何实现一个纯Native的应用 创建项目 AndroidManifest的配置 添加Native层的代码 简介一下NativeActivity 加载PNG图片 png库的编译 png库的使用 OpenGLES贴图 创建纹理Texture 使用纹理 Shader的那些事 小结 #OpenGLES 纯Native实现PNG图片贴图 春节临近本来不想更了,但是为了纪念即将逝去的一年,还是留下点什么吧!就让我们用OpenglES实现一个纯native的png图片的贴图! 如何实现一个纯Native的应用 我采用的是Android Studio!Android提供了 NativeActivity 来实现纯Native应用,我们将Native的实现打包成一个共享库,通过 NativeActivity 来调对应的共享库。创建一个native的应用,和正常项目大同小异,总的来说,主要注意一下几个部分: 创建项目 时选择 Native C++ ,C++ 标准我采用的是 C++ 14 AndroidManifest的配置 添加Activity,名称就是 android.app.NativeActivity ,主要的就是这里的 meta-data ,native打包成共享库 opengles_simples 。 <activity android:name="android.app

Linux之cmake3.6安装

心不动则不痛 提交于 2020-01-21 04:28:27
1.官网下载cmake-3.6.3.tar.gz https://cmake.org/files/v3.6/cmake-3.6.3.tar.gz 2.解压文件tar -xvf cmake-3.6.3.tar.gz,并修改文件权限chmod -R 777 cmake-3.6.3 3.检测gcc和g++是否安装,如果没有则需安装gcc-g++:sudo apt-get install build-essential (或者直接执行这两条命令sudo apt-get install gcc,sudo apt-get install g++) 4.进入cmake-3.6.3 进入命令 cd cmake-3.6.3 5.执行sudo ./bootstrap 6.执行sudo make 7.执行 sudo make install 8.执行 cmake –-version,返回cmake版本信息,则说明安装成功 [root@localhost local]# cmake --version cmake version 3.6.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). 这个是mysql使用cmake配置的代码 cmake -DCMAKE_INSTALL_PREFIX=/usr/local

How to get path to object files with CMake for both multiconfiguration generator and makefile based ones?

心已入冬 提交于 2020-01-21 03:33:04
问题 I would like to generate a module definition file based on all symbols available in object files in dynamic fashion (think of GTKMM's gendef). For this, I would like to add_custom_command for PRE_LINK step of a target. However, it looks like there is no easy way to get path to all object files with CMake that would work for plain makefiles as well as for multi-configuration generators like Visual Studio. Right now, I have the following add_custom_command(TARGET tgt PRE_LINK COMMAND gendef $

developing an llvm pass with cmake out of llvm source directory

社会主义新天地 提交于 2020-01-21 02:27:35
问题 I am trying to develop an llvm pass under my project directory. For that, I follow the info in http://llvm.org/docs/CMake.html#developing-llvm-pass-out-of-source. I create my CMakeFiles appropriately as in this link and my final project directory is like; |-- src | |-- CMakeLists.txt | |-- bigForPass | | |-- CMakeLists.txt | | |-- bigForPass.cpp | | |-- merged.bc | |-- build I also linked my source files with llvm root directory without any problem. Finally I make the build under the 'build'

developing an llvm pass with cmake out of llvm source directory

﹥>﹥吖頭↗ 提交于 2020-01-21 02:27:05
问题 I am trying to develop an llvm pass under my project directory. For that, I follow the info in http://llvm.org/docs/CMake.html#developing-llvm-pass-out-of-source. I create my CMakeFiles appropriately as in this link and my final project directory is like; |-- src | |-- CMakeLists.txt | |-- bigForPass | | |-- CMakeLists.txt | | |-- bigForPass.cpp | | |-- merged.bc | |-- build I also linked my source files with llvm root directory without any problem. Finally I make the build under the 'build'

Finding python site-packages directory with CMake

半腔热情 提交于 2020-01-21 01:13:12
问题 I use CMake to build my application. How can I find where the python site-packages directory is located? I need the path in order to compile an extension to python. CMake has to be able to find the path on all three major OS as I plan to deploy my application on Linux, Mac and Windows. I tried using include(FindPythonLibs) find_path( PYTHON_SITE_PACKAGES site-packages ${PYTHON_INCLUDE_PATH}/.. ) however that does not work. I can also obtain the path by running python -c "from distutils

cmake QT

限于喜欢 提交于 2020-01-20 18:37:31
用CMake来组织的工程中要用Qt首先要设置、找到Qt相关模块。主要是通过 find_package 这个CMake命令。 设置Qt库路径 Qt版本很多,我们的开发机上一般也装有多个不同版本的Qt。个人尝试性的项目一般用最新版的Qt,而真正发布的产品一般用的是LTS版本Qt(LTS:Long Term Support,长期支持版本,目前最新的LTS是5.9)。 我们的方法是在系统中添加多个环境变量。例如我电脑上装有4个版本:Qt 5.9.4和Qt5.10.1的32位和64位库。所以有4个环境变量: 环境变量名 值 QTDIR594 C:\Qt\Qt5.9.4\5.9.4\msvc2015 QTDIR594_64 C:\Qt\Qt5.9.4\5.9.4\msvc2015_64 QTDIR5101 C:\Qt\Qt5.10.1\5.10.1\msvc2015 QTDIR5101_64 C:\Qt\Qt5.10.1\5.10.1\msvc2015_64 然后在CMakeLists中添加: set(CMAKE_PREFIX_PATH $ENV{QTDIR594}) 通过在 $ENV{} 里选择不同的环境变量就可以切换不同的Qt版本。 查找Qt模块 网上很多CMake查找Qt方法都是过时的Qt4的方法。现在正确的、最新的方法是: find_package(Qt5 COMPONENTS

gmapping编译安装出错Unknown CMake command "check_symbol_exists"

╄→尐↘猪︶ㄣ 提交于 2020-01-20 01:30:41
在源码编译安装gmapping的时候,报错 CMake Error at gmapping/navigation/amcl/CMakeLists.txt:58 (check_symbol_exists): Unknown CMake command "check_symbol_exists". -- Configuring incomplete, errors occurred! See also "/home/lucky/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/lucky/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:1692: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed 解决办法: 在出错的CMakeLists文件里加一行 include(CheckSymbolExists) 来源: CSDN 作者: 樱桃木 链接: https://blog.csdn.net/qq_24624539

centos7 升级cmake

不打扰是莪最后的温柔 提交于 2020-01-20 00:49:56
编译cmake文件时,报错:unknown cmake command “CONTINUE” 猜测这是 cmake 版本过低导致的,那么就需要升级 cmake 到更高的版本。下面是升级 cmake 的步骤: 卸载原有通过 yum 安装的 cmake: sudo yum remove cmake 下载cmake安装包: wget https : / / github . com / Kitware / CMake / releases / download / v3 . 14.5 / cmake - 3.14 .5 - Linux - x86_64 . tar . gz 解压下载好的cmake二进制包: tar zxvf cmake - 3.14 .5 - Linux - x86_64 . tar . gz 解压成功后,下面添加cmake环境变量,编辑 /etc/profile 文件,写入以下内容: export CMAKE_HOME = "你的路径" export PATH = $PATH : $CMAKE_HOME / bin 保存并退出,执行命令让 cmake 环境文件生效: source / etc / profile 此时,再次查看cmake版本,就已经是 3.14.5 了: cmake - version cmake 版本升级完毕。

CMake 常用方法

血红的双手。 提交于 2020-01-19 08:07:02
CMake 允许开发者编写平台无关的 CMakeLists.txt 文件来定制整个编译流程,然后再根据目标用户的平台进一步生成所需的本地化 Makefile 和工程文件,如 Linux 的Makefile 或 Windows 的 Visual Studio 工程。从而做到 Write once, run everywhere 。使用 CMake 的开源项目有 VTK、ITK、KDE、OpenCV等。 以下记录我在 Linux 下使用 CMake 的一些实践。 安装 官方网站: https://cmake.org/ 下载源码包,编译安装如下, $ ./bootstrap $ make $ sudo make install 为了使用方便,再安装一下 ccmake,这是一个更友好的界面化 cmake 配置工具, $ sudo apt-get install cmake3-curses-gui 使用方法 在 linux 下使用 CMake 生成 Makefile 并编译的流程如下: - 编写 CMake 配置文件 CMakeLists.txt 。 - 执行命令 cmake PATH 或者 ccmake PATH 生成 Makefile(其中, PATH 是顶层 CMakeLists.txt 所在的目录)。 - 使用 make 命令进行编译。 1) 编译单个文件 main.c