代码拉取完成,页面将自动刷新
同步操作将从 newgolo/appkit 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
###############################################################################
# 目标平台: aarch64 ubuntu20.04LTS
# 编译平台: x64_86 ubuntu20.04LTS
###############################################################################
include(CMakeForceCompiler)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_LIBRARY_ARCHITECTURE aarch64-linux-gnu)
# 配置交叉编译环境
set(TOOLCHAIN_PATH /opt/toolchain/linux-aarch64-noetic)
set(SYSROOT_PATH ${TOOLCHAIN_PATH}/sysroot)
set(TRIPLET aarch64-linux-gnu)
set(CMAKE_C_COMPILER /usr/bin/${TRIPLET}-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/${TRIPLET}-g++)
# set(CMAKE_FIND_ROOT_PATH ${SYSROOT_PATH} ${SYSROOT_PATH}/opt/ros/noetic)
set(CMAKE_FIND_ROOT_PATH ${SYSROOT_PATH})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# 设置特定cmake变量
set(CMAKE_SIZEOF_VOID_P 8)
set(CMAKE_CROSSCOMPILING true)
# 设置SYSROOT:设置后可能会有编译时找不到库的问题
set(CMAKE_SYSROOT ${SYSROOT_PATH})
set(CMAKE_SYSROOT_COMPILE ${SYSROOT_PATH})
# 修改CMake默认变量值(请谨慎修改!!!)
# set(ENV{SYSROOT_DIR} ${SYSROOT_PATH})
# set(CMAKE_INSTALL_PREFIX ${SYSROOT_PATH}/opt/ros/noetic)
# set(CMAKE_STAGING_PREFIX ${SYSROOT_PATH})
# set(CMAKE_INCLUDE_PATH ${SYSROOT_PATH}/usr/include)
# set(CMAKE_LIBRARY_PATH ${SYSROOT_PATH}/usr/lib)
# 设置第三方工具
set(ENV{PKG_CONFIG_PATH} ${SYSROOT_PATH}/usr/lib/pkgconfig)
set(PYTHON_EXECUTABLE /usr/bin/python3)
set(ENV{PROTOC_INSTALL_PATH} /usr/bin)
# 添加头文件及库搜索路径
include_directories(${SYSROOT_PATH}/usr/include/aarch64-linux-gnu)
list(APPEND CMAKE_PREFIX_PATH /usr/lib/aarch64-linux-gnu/)
list(APPEND CMAKE_MODULE_PATH /usr/lib/aarch64-linux-gnu/cmake)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。