- 新建cmake-aarch64-libreelec-linux-gnueabi.conf配置文件,指定交叉编译相关选项
SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION 1) SET(CMAKE_SYSTEM_PROCESSOR aarch64) SET(CMAKE_C_COMPILER /path/toolchain/bin/aarch64-libreelec-linux-gnueabi-gcc) SET(CMAKE_CXX_COMPILER /path/toolchain/bin/aarch64-libreelec-linux-gnueabi-g++) SET(CMAKE_CPP_COMPILER /path/toolchain/bin/aarch64-libreelec-linux-gnueabi-cpp) SET(CMAKE_FIND_ROOT_PATH /path/toolchain/aarch64-libreelec-linux-gnueabi/sysroot) set(CMAKE_STRIP /path/toolchain/bin/aarch64-libreelec-linux-gnueabi-strip) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
- CMakeList.txt 设置配置文件
set(CMAKE_TOOLCHAIN_FILE /home/zdx/MountDisk/S905L/build.EmuELEC-Amlogic.aarch64-4.3/toolchain/etc/cmake-aarch64-libreelec-linux-gnueabi.conf)
CMAKE项目配置交叉编译选项
最新推荐文章于 2024-04-06 08:43:27 发布