File: Toolchain-raspberrypi.cmake

package info (click to toggle)
allegro5 2%3A5.2.10.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 10,872 kB
  • sloc: ansic: 109,795; cpp: 12,976; objc: 4,592; java: 2,845; python: 2,595; javascript: 1,238; sh: 1,008; makefile: 41; xml: 27; pascal: 24
file content (39 lines) | stat: -rw-r--r-- 1,461 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SET(ALLEGRO_RASPBERRYPI 1)
SET(CMAKE_SYSTEM_NAME Linux)

IF("${TOOLCHAIN_ROOT}" STREQUAL "")
   SET(TOOLCHAIN_ROOT "/usr/bin")
ENDIF("${TOOLCHAIN_ROOT}" STREQUAL "")

IF("${TOOLCHAIN_PREFIX}" STREQUAL "")
   SET(TOOLCHAIN_PREFIX "")
ENDIF("${TOOLCHAIN_PREFIX}" STREQUAL "")

IF("${TOOLCHAIN_SUFFIX}" STREQUAL "")
   SET(TOOLCHAIN_SUFFIX "")
ENDIF("${TOOLCHAIN_SUFFIX}" STREQUAL "")

SET(CMAKE_C_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard -Os")
SET(CMAKE_CXX_FLAGS "-march=armv6 -mfpu=vfp -mfloat-abi=hard -Os")

if(NOT DISTCC)
    set(CMAKE_C_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}gcc${TOOLCHAIN_SUFFIX})
    set(CMAKE_CXX_COMPILER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}g++${TOOLCHAIN_SUFFIX})
endif()
set(CMAKE_LINKER ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}ld${TOOLCHAIN_SUFFIX})
set(CMAKE_NM ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}nm${TOOLCHAIN_SUFFIX})
set(CMAKE_OBJCOPY ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}objcopy${TOOLCHAIN_SUFFIX})
set(CMAKE_OBJDUMP ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}objdump${TOOLCHAIN_SUFFIX})
set(CMAKE_STRIP ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}strip${TOOLCHAIN_SUFFIX})
set(CMAKE_RANLIB ${TOOLCHAIN_ROOT}/${TOOLCHAIN_PREFIX}ranlib${TOOLCHAIN_SUFFIX})

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

include_directories(
   "/opt/vc/include"
   "/opt/vc/include/interface/vcos/pthreads"
   "/opt/vc/include/interface/vmcs_host/linux"
)