sitara_depot/compile/toolchain_beagle_bone.cmake

33 lines
1.6 KiB
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
# Подумать над универсальностью этого пути. Папка пользователя мешает.
set (TI_SDK_PATH /home/svad/ti/ti-processor-sdk-linux-am57xx-evm-08_02_01_00)
set (LINUX_DEVKIT_PATH ${TI_SDK_PATH}/linux-devkit)
set(CMAKE_SYSROOT /home/svad/armdev/beagle_board/sysroot)
include_directories(/home/svad/armdev/beagle_board/sysroot/usr/include/arm-linux-gnueabihf)
# Иформация для сборки берется из файла Rules.make, который лежит в папке ti-processor-sdk-linux-am57xx-evm-08_02_01_00
# Все создаваемые в этом файле cmake-переменные имеют то же имя, что и в Rules.make.
# Компилятор для arm
set (CROSS_COMPILE ${LINUX_DEVKIT_PATH}/sysroots/x86_64-arago-linux/usr/bin/arm-none-linux-gnueabihf-)
#set (CROSS_COMPILE /home/svad/armdev/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-)
# Указываем компилятор
set(CMAKE_CXX_COMPILER ${CROSS_COMPILE}g++ CACHE FILEPATH "Sitara Linux C++ compiler")
set(CMAKE_C_COMPILER ${CROSS_COMPILE}gcc CACHE FILEPATH "Sitara Linux C compiler")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT 11)
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT 14)
#set(CMAKE_C_COMPILER_FORCED TRUE)
#set(CMAKE_CXX_COMPILER_FORCED TRUE)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)