Last active
August 29, 2015 14:26
-
-
Save farleylai/c329dba2996ef7acde1b to your computer and use it in GitHub Desktop.
Toolchain file for CMake cross-compilation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET(CMAKE_SYSTEM_NAME Linux) | |
#this one not so much | |
SET(CMAKE_SYSTEM_VERSION 1) | |
# specify the cross compiler | |
SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc -mfloat-abi=hard) | |
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ -mfloat-abi=hard) | |
set(CMAKE_AR arm-linux-gnueabihf-ar CACHE FILEPATH "Archiver") | |
# where is the target environment | |
SET(CMAKE_FIND_ROOT_PATH /usr/local/linaro/arm-linux-gnueabihf/arm-linux-gnueabihf/libc) | |
# search for programs in the build host directories | |
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | |
# for libraries and headers in the target directories | |
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | |
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment