From 785b997a2e4a0d2ce49af7ce0f87afe9748e797e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 8 May 2017 11:31:23 +0200 Subject: [PATCH] posix_rpi_cross_no_shield.cmake: move -D__DF_RPI_SINGLE from commons to this file --- cmake/configs/posix_rpi_cross_no_shield.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/configs/posix_rpi_cross_no_shield.cmake b/cmake/configs/posix_rpi_cross_no_shield.cmake index c299e21b7c..d5f89b97b7 100644 --- a/cmake/configs/posix_rpi_cross_no_shield.cmake +++ b/cmake/configs/posix_rpi_cross_no_shield.cmake @@ -2,13 +2,18 @@ # use this file to cross compile px4 for raspberry pi without any shield include(configs/posix_rpi_common) +add_definitions( + -D__DF_RPI_SINGLE # For raspberry pi without shield accessory +) + if("$ENV{RPI_USE_CLANG}" STREQUAL "1") - set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake) + set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake) else() - set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake) + set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake) endif() + set(CMAKE_PROGRAM_PATH - "${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin" - ${CMAKE_PROGRAM_PATH} + "${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin" + ${CMAKE_PROGRAM_PATH} )