add include path for cJSON
parent
97bbe359a2
commit
c3df224c97
|
@ -238,12 +238,12 @@ void init_consts();')
|
||||||
// Embed cjson either in embedvlib or in json.o
|
// Embed cjson either in embedvlib or in json.o
|
||||||
if imports_json && c.build_mode == EMBED_VLIB ||
|
if imports_json && c.build_mode == EMBED_VLIB ||
|
||||||
(c.build_mode == BUILD && c.out_name.contains('json.o')) {
|
(c.build_mode == BUILD && c.out_name.contains('json.o')) {
|
||||||
cgen.genln('#include "json/cJSON/cJSON.c" ')
|
cgen.genln('#include "cJSON.c" ')
|
||||||
}
|
}
|
||||||
// We need the cjson header for all the json decoding user will do in default mode
|
// We need the cjson header for all the json decoding user will do in default mode
|
||||||
if c.build_mode == DEFAULT_MODE {
|
if c.build_mode == DEFAULT_MODE {
|
||||||
if imports_json {
|
if imports_json {
|
||||||
cgen.genln('#include "json/cJSON/cJSON.h"')
|
cgen.genln('#include "cJSON.h"')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if c.build_mode == EMBED_VLIB || c.build_mode == DEFAULT_MODE {
|
if c.build_mode == EMBED_VLIB || c.build_mode == DEFAULT_MODE {
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
|
|
||||||
module json
|
module json
|
||||||
|
|
||||||
// #include "json/cJSON/cJSON.c"
|
// TODO: windows support
|
||||||
#include "json/cJSON/cJSON.h"
|
#flag linux -I$HOME/code/v/thirdpaty/cJSON
|
||||||
|
#flag mac -I$HOME/code/v/thirdpaty/cJSON
|
||||||
|
|
||||||
|
// #include "cJSON.c"
|
||||||
|
#include "cJSON.h"
|
||||||
struct C.cJSON {
|
struct C.cJSON {
|
||||||
valueint int
|
valueint int
|
||||||
valuestring byteptr
|
valuestring byteptr
|
||||||
|
|
Loading…
Reference in New Issue