diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f271ef4..d5599768 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,14 @@ project(MD4C LANGUAGES C ) +if(IDF_TARGET) + idf_component_register( + SRC_DIRS "src" + INCLUDE_DIRS "src" + ) + return() # Stops executing the desktop configurations below when building for ESP32 +endif() + option(BUILD_MD2HTML_EXECUTABLE "Whether to compile the md2html executable" ON) diff --git a/idf_component.yml b/idf_component.yml new file mode 100644 index 00000000..3596289e --- /dev/null +++ b/idf_component.yml @@ -0,0 +1,17 @@ +version: "0.5.3" +description: "Fast, SAX-like Markdown parser implementation in C compliant with the CommonMark specification." +url: "https://github.com/mity/md4c" +maintainers: + - "Martin Mitáš " +targets: + - esp32 + - esp32s2 + - esp32s3 + - esp32c2 + - esp32c3 + - esp32c6 + - esp32h2 + - esp32p4 + - linux +dependencies: + idf: ">=5.3" \ No newline at end of file diff --git a/library.json b/library.json new file mode 100644 index 00000000..24546867 --- /dev/null +++ b/library.json @@ -0,0 +1,38 @@ +{ + "name": "md4c", + "version": "0.5.3", + "description": "Fast, SAX-like Markdown parser implementation in C compliant with the CommonMark specification.", + "keywords": [ + "markdown", + "parser", + "commonmark", + "html", + "text" + ], + "authors": [ + { + "name": "Martin Mitáš", + "url": "https://github.com/mity" + } + ], + "license": "MIT", + "homepage": "https://github.com/mity/md4c", + "repository": { + "type": "git", + "url": "https://github.com/mity/md4c" + }, + "build": { + "includeDir": "src", + "srcDir": "src" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "platforms": [ + "espressif32", + "espressif8266", + "ststm32", + "raspberrypi" + ] +} \ No newline at end of file diff --git a/library.properties b/library.properties new file mode 100644 index 00000000..f8104e52 --- /dev/null +++ b/library.properties @@ -0,0 +1,11 @@ +name=md4c +version=0.5.3 +author=Martin Mitáš +maintainer=Martin Mitáš +sentence=Fast, SAX-like Markdown parser implementation in C. +paragraph=A highly optimized Markdown parser compliant with the latest version of the CommonMark specification. Easy to stream and parse documents directly on embedded devices. +category=Data Processing +url=https://github.com/mity/md4c +architectures=* +includes=md4c.h +license=MIT