Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
Trying out some stuff with the toolchain extra variables
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <[email protected]>
  • Loading branch information
Emerson Knapp committed Jul 21, 2020
1 parent 8a77af3 commit e776749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ros_cross_compile/toolchains/aarch64-gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ set(TRIPLE aarch64-linux-gnu)
set(PY_VERSION 38)
set(CMAKE_SYSTEM_PROCESSOR aarch64)



# Generic
function(require_env name)
if("$ENV{${name}}" STREQUAL "")
Expand All @@ -18,6 +16,7 @@ require_env(ROS_DISTRO)

set(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_LIBRARY_ARCHITECTURE ${TRIPLE})

set(CMAKE_C_COMPILER /usr/bin/${TRIPLE}-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/${TRIPLE}-g++)
Expand All @@ -31,6 +30,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

set(PYTHON_SOABI cpython-${PY_VERSION}m-${TRIPLE})
set(THREADS_PTHREAD_ARG "0" CACHE STRING "Result from TRY_RUN" FORCE)

set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64-static)

0 comments on commit e776749

Please sign in to comment.