cmake

ROS与Arduino:利用CMake编译代码并上传到arduino

梦想的初衷 提交于 2020-01-29 17:56:25
为什么要利用CMake编译代码并上传到arduino? 当需要开发大点的软件项目,Arduino IDE对代码的管理就变得比较笨拙。 如果你经常想要从命令行或能自动完成的eclipse编译代码 最后你可以通过rosserial_client的CMake基础架构,你利用ROS buildfarm构建和分发固件 这个blog只说一个简单的示例。 老样子,给大家我整理好的包: 下载地址 1. 创建工作空间等,此处略 在catkin工作空间下src目录下 $ cd ~/catkin_ws_cmake/src/ $ catkin_create_pkg helloworld rosserial_arduino rosserial_client std_msgs 使用catkin_create_pkg创建helloworld包,依赖rosserial_arduino(需要Arduino的工具链)和rosserial_client(客户端库生成macros),最后打算使用std_msgs/String,需要依赖std_msgs。 2. 在helloworld包,建立firmware/chatter.cpp,复制粘贴如下示例代码内容: # include <ros.h> # include <std_msgs/String.h> //Arduino.h头文件,它包含了所有的Arduino函数

CentOS7离线安装pgRouting

冷暖自知 提交于 2020-01-29 01:08:17
一、编译环境准备 pgRouting的安装需要boost,cgal的编译环境,而cgal的安装又需要cmake编译工具。 1. 检查编译环境 在postgresql和postgis的安装中,我们已经安装了系统镜像的全部rpm包,boost也会被自动安装,可通过一下命令检查boost版本。 vim /usr/include/boost/version.hpp cgal https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-4.13.2 cmake https://cmake.org/files/v3.2/cmake-3.2.0.tar.gz pgrouting https://github.com/pgRouting/pgrouting/releases/download/v2.6.3/pgrouting-2.6.3.tar.gz 二、编译安装上述依赖 1. 卸载旧版本cmake 如果服务器版本足够,可忽略此步骤 可以通过命令 cmake -version 检查服务器自带版本。如果偏低,需要卸载后重新安装新版本。 需要3.1以上版本 yum remove cmake -y 2. cmake cmake tar -zxvf cmake-3.2.0.tar.gz cd cmake-3.2.0 ./bootstrap gmake

ubuntu18.04安装CMake及g++

我与影子孤独终老i 提交于 2020-01-28 12:11:06
1.CMake 安装 sudo apt install cmake 安装成功 查看已安装cmake版本号。 cmake --version 2.g++安装 sudo apt install g++ 若不安装g++,直接用cmake编译的话,会出现下面的错误。 CMake Error at CMakeLists.txt:6 (PROJECT): No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. -- Configuring incomplete, errors occurred! 来源: CSDN 作者: Comma_dev 链接: https://blog.csdn.net/xiaodouhao123456/article/details/103751821

Link static library using CMake

≡放荡痞女 提交于 2020-01-28 10:58:06
问题 I cannot get the library ${static_library} to statically link using CMake. I have tried hard coding the path and as far as I'm aware TARGET_LINK_LIBRARIES should link this in automatically. ADD_LIBRARY(libraryA STATIC ${source_files}) TARGET_LINK_LIBRARIES(libraryA debug ${static_library}) There is a sub project that links libraryA later in the build ADD_EXECUTABLE(testA ${test_sources}) TARGET_LINK_LIBRARIES(testA libraryA) which has ${static_library} correctly linked in but I need ${static

Link static library using CMake

时间秒杀一切 提交于 2020-01-28 10:56:02
问题 I cannot get the library ${static_library} to statically link using CMake. I have tried hard coding the path and as far as I'm aware TARGET_LINK_LIBRARIES should link this in automatically. ADD_LIBRARY(libraryA STATIC ${source_files}) TARGET_LINK_LIBRARIES(libraryA debug ${static_library}) There is a sub project that links libraryA later in the build ADD_EXECUTABLE(testA ${test_sources}) TARGET_LINK_LIBRARIES(testA libraryA) which has ${static_library} correctly linked in but I need ${static

安装mysql5.7版本cmake报错问题--1

落爺英雄遲暮 提交于 2020-01-28 03:21:28
文章目录 一:cmake报错问题 1.1:报错CMake Error at cmake/os/Linux.cmake:41 (MESSAGE): 1.2:解决 1.3:有可能继续报错CMake Error at cmake/boost.cmake:81 (MESSAGE): 1.4:解决 1.4.1:如果已经下载了boost包 1.4.2:如果没有下载boost包 一:cmake报错问题 1.1:报错CMake Error at cmake/os/Linux.cmake:41 (MESSAGE): 手工编译安装mysql,cmake时报错: 报错内容如下: – Running cmake version 2.8.12.2 – Could NOT find Git (missing: GIT_EXECUTABLE) – Configuring with MAX_INDEXES = 64U – The C compiler identification is unknown – The CXX compiler identification is unknown CMake Error: your C compiler: “CMAKE_C_COMPILER-NOTFOUND” was not found. Please set CMAKE_C_COMPILER to a valid

CMake build multiple targets in different build directories

荒凉一梦 提交于 2020-01-28 02:37:09
问题 I have the following CMake structure: CMakelists.txt toolchain.cmake folder1 ----CMakelists.txt folder2 ----CMakelists.txt etc.. My first-level CMakelists.txt file includes the other subdirectories. Now I want to build my code for a different target. The manual way is: 1. mkdir hostBuild cd hostBuild cmake .. make 2. mkdir crossBuild cd crossBuild cmake .. --DCMAKE_TOOLCHAIN_FILE=toolchain.cmake make Is it possible that this process can run automatically? For example, I just have to run cmake

在 flutter 上使用 c 代码 - (二) 无源码的项目

自作多情 提交于 2020-01-27 03:05:22
写在前面, 对于无源码的项目, 理论上必须有头文件,不然你不知道里面都定义了什么鬼东西. 本篇虽然是写无源码的项目, 但实际上还是会有源码部分, 只是通过 cmake,clang,xcodebuild,ndk 等工具编译成 so/framework 以供 android/ios 引入 生成动态库 整体的目录结构是这样的, 如果你只是要引入库, 可以跳过这步, 这步的主要做源码生成库的步骤 $ tree -L 3 cpp-source tree -L 3 cpp-source cpp-source ├── android │ ├── CMakeLists.txt │ ├── build_android.sh │ └── cmd │ └── android.sh ├── ios │ ├── CMakeLists.txt │ ├── build_ios.sh │ ├── cmd │ │ └── ios_abi_build.sh │ └── ios.toolchain.cmake └── src ├── some.cpp └── some.h src 为源码 some.cpp # include "some.h" # include <stdint.h> extern "C" __attribute__ ( ( visibility ( "default" ) ) ) _

OSG和ProLand 的海面仿真

筅森魡賤 提交于 2020-01-26 19:48:08
基于OSG的海面仿真 OSG中国官网 http://www.osgchina.org/ OSG-ocean的效果图如下 proland的效果图如下 下面为OSG和OCEAN的配置 配置方法转自 http://blog.csdn.net/sohu_2011/article/details/7909803 下面所有的文件都可以在 http://download.csdn.net/detail/xdjinjian/5698027 下载到 一步步编译OsgOcean 电脑: 操作系统:win7 编译器:vs2010 显卡:NVIDIA GeForce GTX 550Ti 准备工作 一 安装cmake 网络下载cmake,并安装; 我安装的是cmake-2.8.9-win32-x86.exe 二 下载OSG并编译 osgOcean 1.0.1是用osg开发的,所以要安装OSG,官网上说可以用OSG2.8.2编译,所以我下载了OSG2.8.2源码来编译。OSG的国外官网进不去,但是国内的osgchina可以下载源码, 网络地址: http://www.osgchina.org/projects/osgcn/wikicn/Downloads.php 目前下载OSG2.8.2只能通过该网址提供的svn来下载;下面是svn http://www.openscenegraph.org/svn/osg

xcode cmake 配置opencv

拈花ヽ惹草 提交于 2020-01-26 19:46:57
cmake编译opencv 编译过程出现文件下载失败问题: face_landmark_model.dat文件下载地址: https://github.com/opencv/opencv_3rdparty/tree/contrib_face_alignment_20170818 修改opencv/opencv_contrib/blob/master/modules/face/CMakeLists.txt,把 " https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/ " 改为 " file:///opencv/download_path/ " ippicv 文件下载地址: https://github.com/opencv/opencv_3rdparty/tree/ippicv/master_20180723/ippicv 修改 /opencv/opencv/blob/master/3rdparty/ippicv/CMakeLists.txt,把“ https://github.com/opencv/opencv_3rdparty/tree/ippicv/master_20180723/ippicv ” 替换为 “ file:///opencv/download_path/ ”