Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Define our host system
- set(CMAKE_SYSTEM_NAME Linux)
- set(CMAKE_SYSTEM_PROCESSOR arm)
- # Define the cross compiler locations
- set(tools /home/<user>/Resources/raspberrypi-tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf)
- set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
- set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)
- # Define the sysroot path for the RaspberryPi distribution in our tools folder
- set(CMAKE_FIND_ROOT_PATH ${tools}/arm-linux-gnueabihf/sysroot)
- set(CMAKE_STAGING_PREFIX /home/<user>/Development/pibuild)
- # Use our definitions for compiler tools
- set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
- # Search for libraries and headers in the target directories only
- set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
- set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
- add_definitions(-Wall -std=c11)
Add Comment
Please, Sign In to add comment