where is json/json.h from webrtc/base/json.h

724 views
Skip to first unread message

Andres Gonzalez

unread,
Jun 2, 2016, 5:23:13 PM6/2/16
to discuss-webrtc
Hi,

I am trying to build the example from examples/peerconnection/client in a new build environment and I am having some issues with finding the header files.

In conductor.cc  line #19 includes base/json.h    In that file, line #17 to #21 is the following:

#if !defined(WEBRTC_EXTERNAL_JSON)
#include "json/json.h"
#else
#include "third_party/jsoncpp/json.h"
#endif

From the comment on line #29 it appears that there is an option as to which json library to use, either jsoncpp or one defined in "json/json.h"   However, the only json.h I can find (other than the main one under base) is under jsoncpp at:  /src/third_party/jsoncpp/source/include/json/json.h

Is the option for "json/json.h really non-existent and the only json library available to use is the one from jsoncpp?

Thanks,
-Andres 




Henrik Kjellander

unread,
Jun 6, 2016, 1:35:43 PM6/6/16
to discuss...@googlegroups.com
The define is not set for that source, so "json/json.h" will be used.
It works since https://cs.chromium.org/chromium/src/third_party/jsoncpp/jsoncpp.gypi?sq=package:chromium&dr=C sets the include path properly for targets that depends on it.

So the one at /src/third_party/jsoncpp/source/include/json/json.h will be used for your build.
If you want another jsoncpp implementation you can look into the json_root variable: https://cs.chromium.org/chromium/src/third_party/webrtc/build/common.gypi?rcl=0&l=84

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/70a138c3-2b59-48b5-b412-f83b4021dcf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rogério Richa

unread,
Jun 15, 2016, 3:42:26 AM6/15/16
to discuss-webrtc
Any luck so far? I've circumvented that by simply updating the include path but I'm not really happy having to modify the code. 

Andres Gonzalez

unread,
Jun 15, 2016, 1:30:06 PM6/15/16
to discuss-webrtc
HI,

Actually, I had to do the same thing, and I also don't like it.  I guess I should not complain because the source did build on debian jessie without problems. I was trying to only pull out parts that I needed, and build some simpler shared libs.  But with a build tree as complex as this one I should have known that there would be tons of inter-dependencies that would make any such hacking difficult. 

-Andres
Reply all
Reply to author
Forward
0 new messages