Toolchain-rpi.cmake 554 B

12345678910111213
  1. # -- How to cross compile for Raspberry Pi (on a 32bit host) --
  2. # 1) get the toolchain
  3. # cd ~
  4. # git clone https://github.com/raspberrypi/tools
  5. # 2) export path to one of the compilers
  6. # export PATH=$PATH:~/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/
  7. # 3) use this toolchain file
  8. # cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi.cmake -DEXAMPLESERVER=ON ..
  9. # make
  10. set(CMAKE_C_COMPILER arm-bcm2708hardfp-linux-gnueabi-gcc)
  11. set(CMAKE_CXX_COMPILER arm-bcm2708hardfp-linux-gnueabi-g++)
  12. set(CMAKE_STRIP arm-bcm2708hardfp-linux-gnueabi-strip)