1# Platform defines. 2set(CMAKE_SYSTEM_NAME Linux) 3set(CMAKE_CROSSCOMPILING 1) 4set(DE_CPU "DE_CPU_ARM") 5 6# Toolchain/compiler base. 7set(CC_PATH "/opt/raspi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi" CACHE STRING "Cross compiler path") 8set(CROSS_COMPILE "${CC_PATH}/bin/arm-bcm2708hardfp-linux-gnueabi-" CACHE STRING "Cross compiler prefix") 9set(SYSROOT_PATH "${CC_PATH}/arm-bcm2708hardfp-linux-gnueabi/sysroot" CACHE STRING "Raspbian sysroot path") 10 11set(CMAKE_C_COMPILER "${CROSS_COMPILE}gcc") 12set(CMAKE_CXX_COMPILER "${CROSS_COMPILE}g++") 13 14# Search libs and include files (but not programs) from toolchain dir. 15set(CMAKE_FIND_ROOT_PATH ${SYSROOT_PATH}) 16set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 17set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 18set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 19 20set(TARGET_C_FLAGS "") 21set(CMAKE_C_FLAGS "${TARGET_C_FLAGS}" CACHE STRING "" FORCE) 22set(CMAKE_CXX_FLAGS "${TARGET_C_FLAGS}" CACHE STRING "" FORCE) 23