mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-21 06:56:11 -04:00
Merge branch 'feature/add_kconfig_for_jsmn' into 'master'
jsmn configuration added Closes IDFGH-2274 See merge request espressif/esp-idf!6873
This commit is contained in:
commit
78891a9571
@ -1,2 +1,10 @@
|
|||||||
idf_component_register(SRCS "src/jsmn.c"
|
idf_component_register(SRCS "src/jsmn.c"
|
||||||
INCLUDE_DIRS "include")
|
INCLUDE_DIRS "include")
|
||||||
|
|
||||||
|
if(CONFIG_JSMN_PARENT_LINKS)
|
||||||
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DJSMN_PARENT_LINKS")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_JSMN_STRICT)
|
||||||
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DJSMN_STRICT")
|
||||||
|
endif()
|
||||||
|
16
components/jsmn/Kconfig
Normal file
16
components/jsmn/Kconfig
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
menu "jsmn"
|
||||||
|
|
||||||
|
|
||||||
|
config JSMN_PARENT_LINKS
|
||||||
|
bool "Enable parent links"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
You can access to parent node of parsed json
|
||||||
|
|
||||||
|
config JSMN_STRICT
|
||||||
|
bool "Enable strict mode"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
In strict mode primitives are: numbers and booleans
|
||||||
|
|
||||||
|
endmenu
|
@ -4,3 +4,11 @@
|
|||||||
|
|
||||||
COMPONENT_ADD_INCLUDEDIRS := include/
|
COMPONENT_ADD_INCLUDEDIRS := include/
|
||||||
COMPONENT_SRCDIRS := src/
|
COMPONENT_SRCDIRS := src/
|
||||||
|
|
||||||
|
ifdef CONFIG_JSMN_PARENT_LINKS
|
||||||
|
src/jsmn.o: CPPFLAGS += -DJSMN_PARENT_LINKS
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_JSMN_STRICT
|
||||||
|
src/jsmn.o: CPPFLAGS += -DJSMN_STRICT
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user