Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 30 lines (25 sloc) 1.253 kB
dfce4a7 @jonforums Add Ubuntu -> Linux-on-ARM CMake toolchain files
jonforums authored
1 # Sample toolchain file for building for ARM from an Ubuntu Linux system.
2 #
3 # Typical usage:
4 # 1) install cross compiler: `sudo apt-get install gcc-arm-linux-gnueabi`
5 # 2) cp cmake/Toolchain-Ubuntu-gnueabi.cmake.sample ~/Toolchain-Ubuntu-gnueabi.cmake
6 # 3) tweak toolchain values as needed
7 # 4) cd build
8 # 5) cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Ubuntu-gnueabi.cmake ..
9
10 # name of the target OS on which the built artifacts will run and the
11 # toolchain prefix. if target is an embedded system without an OS, set
12 # CMAKE_SYSTEM_NAME to `Generic`
13 set(CMAKE_SYSTEM_NAME Linux)
14 set(TOOLCHAIN_PREFIX arm-linux-gnueabi)
15
16 # cross compilers to use for C
17 set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
18
19 # target environment on the build host system
20 # set 1st to dir with the cross compiler's C/C++ headers/libs
21 # set 2nd to dir containing personal cross development headers/libs
22 set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} ~/crossdev/eabi)
23
24 # modify default behavior of FIND_XXX() commands to
25 # search for headers/libs in the target environment and
26 # search for programs in the build host environment
27 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
28 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
29 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Something went wrong with that request. Please try again.