2019-06-06 14:21:15 +02:00
|
|
|
# CMake toolchain to build libnd4j for Raspberry PI. Sample usage:
|
|
|
|
#
|
|
|
|
# PI_BIN=/path/to/raspberrypi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf \
|
|
|
|
# cmake -DCMAKE_TOOLCHAIN_FILE=rpi.cmake -DCMAKE_INSTALL_PREFIX=..
|
|
|
|
|
|
|
|
SET(CMAKE_SYSTEM_NAME Linux)
|
|
|
|
SET(CMAKE_SYSTEM_VERSION 1)
|
|
|
|
|
2021-02-01 06:31:20 +01:00
|
|
|
set(CMAKE_C_COMPILER "$ENV{RPI_BIN}-gcc" CACHE STRING "" FORCE)
|
|
|
|
set(CMAKE_CXX_COMPILER "$ENV{RPI_BIN}-g++" CACHE STRING "" FORCE)
|
2019-06-06 14:21:15 +02:00
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|