SHARE
TWEET

Untitled

a guest Jan 21st, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Define our host system
  2. set(CMAKE_SYSTEM_NAME Linux)
  3. set(CMAKE_SYSTEM_PROCESSOR arm)
  4.  
  5. # Define the cross compiler locations
  6. set(tools /home/<user>/Resources/raspberrypi-tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf)
  7. set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
  8. set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)
  9.  
  10. # Define the sysroot path for the RaspberryPi distribution in our tools folder
  11. set(CMAKE_FIND_ROOT_PATH ${tools}/arm-linux-gnueabihf/sysroot)
  12. set(CMAKE_STAGING_PREFIX /home/<user>/Development/pibuild)
  13.  
  14. # Use our definitions for compiler tools
  15. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  16. # Search for libraries and headers in the target directories only
  17. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  18. set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  19.  
  20. add_definitions(-Wall -std=c11)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top