From d8dfab88d3a648afa250666b73aee79d153ac378 Mon Sep 17 00:00:00 2001 From: baruch Date: Tue, 24 Jul 2018 02:24:13 +0300 Subject: [PATCH 1/4] component.mk added - to make esp-idf build system happy --- component.mk | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 component.mk diff --git a/component.mk b/component.mk new file mode 100644 index 000000000..c22074ee0 --- /dev/null +++ b/component.mk @@ -0,0 +1,6 @@ +#IBN_GEN_LIB := $(patsubst $(COMPONENT_PATH)/%,%,$(sort $(dir $(wildcard $(COMPONENT_PATH)/libraries/*/*/)))) + +COMPONENT_ADD_INCLUDEDIRS := . +#COMPONENT_PRIV_INCLUDEDIRS := cores/esp32/libb64 +#COMPONENT_SRCDIRS := cores/esp32/libb64 cores/esp32 variants/esp32 $(ARDUINO_CORE_LIBS) +#CXXFLAGS += -fno-rtti From 0577b894184ff1fd4db5ac86f24627b5c13fe7eb Mon Sep 17 00:00:00 2001 From: baruch Date: Thu, 23 Aug 2018 15:06:31 +0300 Subject: [PATCH 2/4] fix include path --- component.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/component.mk b/component.mk index c22074ee0..dc25d1c0e 100644 --- a/component.mk +++ b/component.mk @@ -1,6 +1 @@ -#IBN_GEN_LIB := $(patsubst $(COMPONENT_PATH)/%,%,$(sort $(dir $(wildcard $(COMPONENT_PATH)/libraries/*/*/)))) - -COMPONENT_ADD_INCLUDEDIRS := . -#COMPONENT_PRIV_INCLUDEDIRS := cores/esp32/libb64 -#COMPONENT_SRCDIRS := cores/esp32/libb64 cores/esp32 variants/esp32 $(ARDUINO_CORE_LIBS) -#CXXFLAGS += -fno-rtti +COMPONENT_ADD_INCLUDEDIRS := src From d3664c6ea7660847d4cb65e88a87bbdffda54198 Mon Sep 17 00:00:00 2001 From: baruch Date: Fri, 4 Oct 2019 14:31:27 +0300 Subject: [PATCH 3/4] esp-idf make system --- component.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 component.mk diff --git a/component.mk b/component.mk new file mode 100644 index 000000000..dc25d1c0e --- /dev/null +++ b/component.mk @@ -0,0 +1 @@ +COMPONENT_ADD_INCLUDEDIRS := src From 66a8e9f774565313cd53a58eb4a7432d6dfa4b41 Mon Sep 17 00:00:00 2001 From: baruch Date: Wed, 19 May 2021 11:44:08 +0300 Subject: [PATCH 4/4] Support compiling as esp-idf component https://github.com/espressif/esp-idf/issues/7024 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a42759e1f..f349e4132 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,13 @@ cmake_minimum_required(VERSION 3.0) +if(ESP_PLATFORM) + # Build ArduinoJson as an ESP-IDF component + idf_component_register(INCLUDE_DIRS src) + target_compile_definitions(${COMPONENT_LIB} INTERFACE ARDUINOJSON_EMBEDDED_MODE=1) + return() +endif() + project(ArduinoJson VERSION 6.18.0) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)