From 4bea2592c0c9042e5113f33864d0282934ff63f2 Mon Sep 17 00:00:00 2001 From: pedroazeredo04 Date: Mon, 7 Aug 2023 11:26:12 -0300 Subject: [PATCH] =?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/FindSPBTLE.cmake | 15 +++++++++++++++ sources.mk | 12 ------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 cmake/FindSPBTLE.cmake delete mode 100644 sources.mk diff --git a/cmake/FindSPBTLE.cmake b/cmake/FindSPBTLE.cmake new file mode 100644 index 0000000..84ce710 --- /dev/null +++ b/cmake/FindSPBTLE.cmake @@ -0,0 +1,15 @@ +set(BLE_PATH + ./lib/SPBTLE +) + +list(APPEND LIB_SOURCES + ${BLE_PATH}/src/spbtle.c +) + +list(APPEND LIB_INCLUDE_DIRECTORIES + ${BLE_PATH}/inc + ./cube/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/includes + ./cube/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/hci/hci_tl_patterns/Basic + ./cube/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/hci/ + ./cube/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/utils +) \ No newline at end of file diff --git a/sources.mk b/sources.mk deleted file mode 100644 index 07f20c7..0000000 --- a/sources.mk +++ /dev/null @@ -1,12 +0,0 @@ -THIS_PATH := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) - -C_INCLUDES += \ - -I$(CUBE_DIR)/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/includes \ - -I$(CUBE_DIR)/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/hci/hci_tl_patterns/Basic \ - -I$(CUBE_DIR)/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/hci/ \ - -I$(CUBE_DIR)/Middlewares/ST/X-CUBE-BLE1_BlueNRG-MS/utils \ - -I$(THIS_PATH)/inc \ - -LIB_SOURCES += $(shell find $(THIS_PATH) -name "*.c") - -undefine THIS_PATH