Browse Source

adding rpi cross compiling toolchain, relates to #165

Stasik0 10 years ago
parent
commit
efd121e767
1 changed files with 11 additions and 0 deletions
  1. 11 0
      cmake/Toolchain-rpi.cmake

+ 11 - 0
cmake/Toolchain-rpi.cmake

@@ -0,0 +1,11 @@
+# -- How to cross compile for Raspberry Pi -- 
+# 1) get the toolchain
+# cd ~
+# git clone https://github.com/raspberrypi/tools
+# 2) export path to one of the compilers
+# export PATH=$PATH:~/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/
+# 3) use this toolchain file 
+# cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-rpi.cmake -DEXAMPLESERVER=ON ..
+# make
+set(CMAKE_C_COMPILER arm-bcm2708hardfp-linux-gnueabi-gcc)
+set(CMAKE_CXX_COMPILER arm-bcm2708hardfp-linux-gnueabi-g++)