From e4e1cd3d4a80e9758f7141e49229f131e7f1119a Mon Sep 17 00:00:00 2001 From: pedroazeredo04 Date: Fri, 4 Aug 2023 12:22:56 -0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=A5=20Add=20CMake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/FindRF24.cmake | 11 +++++++++++ sources.mk | 8 -------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 cmake/FindRF24.cmake delete mode 100644 sources.mk diff --git a/cmake/FindRF24.cmake b/cmake/FindRF24.cmake new file mode 100644 index 0000000..710417a --- /dev/null +++ b/cmake/FindRF24.cmake @@ -0,0 +1,11 @@ +set(RF24_PATH .lib/STM32RF24) + +list(APPEND LIB_SOURCES + ${RF24_PATH}/src/rf24_debug.c + ${RF24_PATH}/src/rf24_plataform.c + ${RF24_PATH}/src/rf24.c +) + +list(APPEND LIB_SOURCES + ${RF24_PATH}/inc +) diff --git a/sources.mk b/sources.mk deleted file mode 100644 index f99aa70..0000000 --- a/sources.mk +++ /dev/null @@ -1,8 +0,0 @@ -THIS_PATH := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) - -C_INCLUDES += \ - -I$(THIS_PATH)/inc - -LIB_SOURCES += $(shell find $(THIS_PATH)/src -name "*.c") - -undefine THIS_PATH From 611d26c661d2d07da95a2512bf8d2db242e16a76 Mon Sep 17 00:00:00 2001 From: pedroazeredo04 Date: Fri, 4 Aug 2023 13:09:42 -0300 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/FindRF24.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/FindRF24.cmake b/cmake/FindRF24.cmake index 710417a..31870a6 100644 --- a/cmake/FindRF24.cmake +++ b/cmake/FindRF24.cmake @@ -1,11 +1,11 @@ -set(RF24_PATH .lib/STM32RF24) +set(RF24_PATH ./lib/STM32RF24) list(APPEND LIB_SOURCES ${RF24_PATH}/src/rf24_debug.c - ${RF24_PATH}/src/rf24_plataform.c + ${RF24_PATH}/src/rf24_platform.c ${RF24_PATH}/src/rf24.c ) -list(APPEND LIB_SOURCES +list(APPEND LIB_INCLUDE_DIRECTORIES ${RF24_PATH}/inc )