From d77cadcf13ccaba6f7f3da10fba75959ac258a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Schro=CC=88der?= Date: Mon, 13 Jul 2020 10:46:17 +0200 Subject: [PATCH] Added CMake support --- .gitignore | 6 ++++++ CMakeLists.txt | 5 +++++ component.mk | 2 +- ads1115.h => include/ads1115.h | 0 ads1115.c => src/ads1115.c | 0 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 CMakeLists.txt rename ads1115.h => include/ads1115.h (100%) rename ads1115.c => src/ads1115.c (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57f7be4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.vscode +**/build +**/sdkconfig +**/sdkconfig.old +tools.mk +NOTES \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d8cfc4d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +set(COMPONENT_SRCS + "src/ads1115.c") +set(COMPONENT_ADD_INCLUDEDIRS "include") + +register_component() diff --git a/component.mk b/component.mk index 91f3eae..5507f24 100644 --- a/component.mk +++ b/component.mk @@ -2,4 +2,4 @@ # ADS1115 Component Makefile # -COMPONENT_ADD_INCLUDEDIRS := . +COMPONENT_SRCDIRS := src . diff --git a/ads1115.h b/include/ads1115.h similarity index 100% rename from ads1115.h rename to include/ads1115.h diff --git a/ads1115.c b/src/ads1115.c similarity index 100% rename from ads1115.c rename to src/ads1115.c