added changes to cmakelist for cross compiling

This commit is contained in:
2024-04-02 12:17:22 +02:00
parent 7f842be454
commit 9ebdd8fd55

View File

@@ -1,5 +1,14 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7-a)
set(TOOLCHAIN_PREFIX home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/SDK/sysroots/x86_64-ostl_sdk-linux/usr/bin/arm-ostl-linux)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
#set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
# Find python and Boost - both are required dependencies # Find python and Boost - both are required dependencies
find_package(PythonLibs 3.10 REQUIRED) find_package(PythonLibs 3.10 REQUIRED)