当前位置:网站首页>CMake交叉编译
CMake交叉编译
2022-07-02 09:41:00 【wangzai6378】
原有CMakeLists.txt中的内容保持不变。新增加一个文件,如toolChain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_FIND_ROOT_PATH /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/lib64
/opt/cross/3rdparty/include
/opt/cross/3rdparty/lib/aarch64)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) #可执行程序不仅仅只是在设置的ROOT_PATH查找
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) #只在设置的ROOT_PATH下查找库
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) #只在设置的ROOT_PATH下查找头文件
在运行cmake的时候指定TOOLCHAIN_FILE, 如:cmake -DCMAKE_TOOLCHAIN_FILE=./toolChain.cmake ..
然后 make即可
边栏推荐
- LVM operation
- K-Means Clustering Visualization in R: Step By Step Guide
- 程序员成长第六篇:如何选择公司?
- qt 仪表自定义控件
- MySQL stored procedure cursor traversal result set
- HOW TO ADD P-VALUES TO GGPLOT FACETS
- Attribute acquisition method and operation notes of C # multidimensional array
- 在网上开股票账户安全吗?我是新手,还请指导
- Cluster Analysis in R Simplified and Enhanced
- php 二维、多维 数组打乱顺序,PHP_php打乱数组二维数组多维数组的简单实例,php中的shuffle函数只能打乱一维
猜你喜欢
HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
Basic usage of MySQL in centos8
Cluster Analysis in R Simplified and Enhanced
Redis超出最大内存错误OOM command not allowed when used memory > 'maxmemory'
PLC-Recorder快速监控多个PLC位的技巧
JS——每次调用从数组里面随机取一个数,且不能与上一次为同一个
【2022 ACTF-wp】
Eight sorting summaries
The selected cells in Excel form have the selection effect of cross shading
Never forget, there will be echoes | hanging mirror sincerely invites you to participate in the opensca user award research
随机推荐
HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R
php 二维、多维 数组打乱顺序,PHP_php打乱数组二维数组多维数组的简单实例,php中的shuffle函数只能打乱一维
Wechat applet uses Baidu API to achieve plant recognition
The difference between SQL left join main table restrictions written after on and where
基于 Openzeppelin 的可升级合约解决方案的注意事项
SQLite modify column type
deepTools对ChIP-seq数据可视化
FLESH-DECT(MedIA 2021)——一个material decomposition的观点
Webauthn - official development document
Jinshanyun - 2023 Summer Internship
C # method of obtaining a unique identification number (ID) based on the current time
pgsql 字符串转数组关联其他表,匹配 拼接后原顺序展示
Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
可昇級合約的原理-DelegateCall
What are the methods of adding elements to arrays in JS
PX4 Position_ Control RC_ Remoter import
Resources reads 2D texture and converts it to PNG format
Attribute acquisition method and operation notes of C # multidimensional array
可升级合约的原理-DelegateCall