From 45f12a50e537f023529f86de9c1464bafd8459fa Mon Sep 17 00:00:00 2001 From: PonomarevDA Date: Thu, 19 Dec 2024 00:44:49 +0300 Subject: [PATCH] do not use spi in v3 by default, use it only with mpu9250 --- Src/drivers/mpu9250/CMakeLists.txt | 8 ++++++++ Src/platform/stm32g0b1/CMakeLists.txt | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/drivers/mpu9250/CMakeLists.txt b/Src/drivers/mpu9250/CMakeLists.txt index 9cd2c32..9b8acc7 100644 --- a/Src/drivers/mpu9250/CMakeLists.txt +++ b/Src/drivers/mpu9250/CMakeLists.txt @@ -1,6 +1,14 @@ # Copyright (C) 2023 Dmitry Ponomarev # Distributed under the terms of the GPL v3 license, available in the file LICENSE. +# Include guard +if(SRC_DRIVERS_MPU9250_DIR) + return() +endif() +set(SRC_DRIVERS_MPU9250_DIR ${CMAKE_CURRENT_LIST_DIR}) + list(APPEND APPLICATION_SOURCES ${CMAKE_CURRENT_LIST_DIR}/mpu9250.cpp ) + +include(${ROOT_DIR}/Src/peripheral/spi/CMakeLists.txt) diff --git a/Src/platform/stm32g0b1/CMakeLists.txt b/Src/platform/stm32g0b1/CMakeLists.txt index f1787c0..de62ca2 100644 --- a/Src/platform/stm32g0b1/CMakeLists.txt +++ b/Src/platform/stm32g0b1/CMakeLists.txt @@ -6,7 +6,6 @@ cmake_path(GET CMAKE_CURRENT_LIST_DIR PARENT_PATH PLATFORM_DIR) cmake_path(GET PLATFORM_DIR PARENT_PATH SRC_DIR) cmake_path(GET SRC_DIR PARENT_PATH ROOT_DIR) -include(${ROOT_DIR}/Src/peripheral/spi/CMakeLists.txt) include(${ROOT_DIR}/Src/peripheral/adc/CMakeLists.txt) set(EXECUTABLE ${PROJECT_NAME}.out)