mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
add include path for cJSON
This commit is contained in:
parent
97bbe359a2
commit
c3df224c97
@ -238,12 +238,12 @@ void init_consts();')
|
||||
// Embed cjson either in embedvlib or in json.o
|
||||
if imports_json && c.build_mode == EMBED_VLIB ||
|
||||
(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
|
||||
if c.build_mode == DEFAULT_MODE {
|
||||
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 {
|
||||
|
@ -4,8 +4,12 @@
|
||||
|
||||
module json
|
||||
|
||||
// #include "json/cJSON/cJSON.c"
|
||||
#include "json/cJSON/cJSON.h"
|
||||
// TODO: windows support
|
||||
#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 {
|
||||
valueint int
|
||||
valuestring byteptr
|
||||
|
Loading…
Reference in New Issue
Block a user