# Use as -DCMAKE_TOOLCHAIN_FILE="toolchain-l4re-x86-64.cmake" to cmake # Target system set(CMAKE_SYSTEM_NAME L4Re) set(CMAKE_SYSTEM_PROCESSOR x86_64) # Compilers set(CMAKE_C_COMPILER x86_64-l4re-gcc) set(CMAKE_CXX_COMPILER x86_64-l4re-g++) # (Optional) Path to the target sysroot # Comment out if not using a sysroot set(CMAKE_SYSROOT /path/to/toolchain/sysroots/x86_64-l4re) # Make CMake search inside the sysroot for includes and libs set(CMAKE_FIND_ROOT_PATH \${CMAKE_SYSROOT}) # Programs live on host, libs/includes come from target set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)