compiler.arm.cmake
SET(GCC_PATH /work/xxx/buildroot/output/rockchip/host/bin)
SET(toolpathprefix ${GCC_PATH}/aarch64-buildroot-linux-gnu-)
set(libusb_path /work/xxx/libusb/install/lib/pkgconfig/libusb-1.0.pc)
SET(CMAKE_C_COMPILER ${toolpathprefix}gcc)
服务器托管网SET(CMAKE_CXX_COMPILER ${toolpathprefix}g++)
SET(CMAKE_STRIP ${toolpathprefix}strip)
SET(CMAKE_AR ${toolpathp服务器托管网refix}ar)
SET(CMAKE_LD ${toolpathprefix}ld)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
message("path ${CMAKE_SYSROOT}")
增加script/mkarm.sh文件
#!/bin/bash
BASEDIR=$(dirname "$0")
cd $BASEDIR/..
workPath="../install"
mkdir build
cd build
export CMAKE_ROOT=/usr/bin/cmake
/usr/bin/cmake ../ -DCMAKE_INSTALL_PREFIX=${workPath} -DWITH_GTK=OFF -DCMAKE_TOOLCHAIN_FILE=../compiler.arm.cmake
num=$(cat /proc/cpuinfo | grep process | wc -l)
make -j${num}
make install
cd -
3、直接执行脚本编译
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: IntelliJ IDEA一站式配置【全】(提高开发效率)
IDEA常用设置(提高开发效率) IDEA是一款当前比较主流的编译器,我个人也用的比较多,但是有时出于各种原因,比如更换设备等等,IDEA总是需要重新安装配置。这就让我比较苦恼,因为总是记不全自己之前都修改了哪些地方(原谅脑子不好使hh),所以就以此篇文章记录…