1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
if (NOT DEFINED ENABLE_JSON OR ENABLE_JSON)
external_or_find_package(JSONC)
endif()
module_switch(ENABLE_JSON "Enable JSON plugin" JSONC_FOUND)
if (NOT ENABLE_JSON)
return()
endif()
set(JSON_SOURCES
format-json.c
format-json.h
json-parser.c
json-parser.h
json-parser-parser.c
json-parser-parser.h
dot-notation.c
dot-notation.h
filterx-format-json.c
filterx-format-json.h
filterx-cache-json-file.c
filterx-cache-json-file.h
json-plugin.c
)
add_module(
TARGET json-plugin
GRAMMAR json-parser-grammar
INCLUDES ${JSONC_INCLUDE_DIR}
DEPENDS ${JSONC_LIBRARY}
SOURCES ${JSON_SOURCES}
)
add_test_subdirectory(tests)
|