IDE for Linux (WebRTC C++)

1,060 views
Skip to first unread message

Alex

unread,
Jan 7, 2017, 10:18:25 AM1/7/17
to discuss-webrtc
Hello,

i am wondering what the IDE options are for development in Linux as the project is using gn as build system now. Unlike gyp, gn is unable to generate CMake files, which can be parsed by several IDEs.

Thanks!
Alex

Alexandre GOUAILLARD

unread,
Jan 8, 2017, 2:23:15 AM1/8/17
to discuss...@googlegroups.com
alex,

I did not know that gyp could generate cmake file, can you point me to an example or the doc? I'm very interested.

For the list of IDE that gn can support, you can take a look there:

I suppose one could write a small script to go from JSON to cmakeLists.txt. if you're interested, and are starting this project, I'd love to join and participate.

Alex.

--

---
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-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/a3cdde8f-1f64-4995-87c2-239fee31c47a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

t...@airtime.com

unread,
Jan 19, 2017, 4:03:32 PM1/19/17
to discuss-webrtc
Yes, we actually use the gyp to cmake conversion. You just need to specify GYP_GENERATORS="cmake"  when running gyp. You'll probably also want to specify GYP_GENERATOR_FLAGS="output_dir='/path/to/generated/cmake/files'". The only annoying thing about going down this road is that you'll need to generate separate cmake files for each platform/architecture you care about and release/debug since all the flags are end up being hard-coded in the generated CMakeLists.txt.

Also, if you care about the obj-c files, you'll want to apply this patch too in order to get correct cmake files: https://bugs.chromium.org/p/gyp/issues/detail?id=451. This is the code in gyp that does the conversion when you specify the cmake generator: https://chromium.googlesource.com/external/gyp.git/+/master/pylib/gyp/generator/cmake.py

The nice thing is that you can load the resulting cmake files with CLion (https://www.jetbrains.com/clion/) and get real source/symbol navigation, class/type hierarchies, etc. You can also use cmake to generate an xcode project for iOS development.

We've also been thinking about how to deal with the removal of gyp; I was actually thinking along the exact same lines as you with using gn's JSON output to convert to cmake (https://codereview.chromium.org/2064533002). 

Tom

On Saturday, January 7, 2017 at 11:23:15 PM UTC-8, Alexandre GOUAILLARD wrote:
alex,

I did not know that gyp could generate cmake file, can you point me to an example or the doc? I'm very interested.

For the list of IDE that gn can support, you can take a look there:

I suppose one could write a small script to go from JSON to cmakeLists.txt. if you're interested, and are starting this project, I'd love to join and participate.

Alex.
On Sat, Jan 7, 2017 at 11:18 PM, Alex <a.brau...@gmail.com> wrote:
Hello,

i am wondering what the IDE options are for development in Linux as the project is using gn as build system now. Unlike gyp, gn is unable to generate CMake files, which can be parsed by several IDEs.

Thanks!
Alex

--

---
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.

Alexandre GOUAILLARD

unread,
Jan 19, 2017, 7:10:32 PM1/19/17
to discuss...@googlegroups.com
yes, i was thinking about this the other day, and it will have the same drawback you mentioned for GYP: 
the JSON is generated for one configuration (one set of parameters), while the ideal case would be to migrate the .gn and .gni files.
It's a good start though.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/45163eda-d5d1-4ef2-a8dd-e60ee8909c24%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alexandre GOUAILLARD

unread,
Jan 20, 2017, 12:07:43 AM1/20/17
to discuss...@googlegroups.com
Funny enough,

this is exactly what Apple is trying to do in Safari:

Alex Brauckmann

unread,
Jan 21, 2017, 8:52:13 AM1/21/17
to discuss...@googlegroups.com
Thank you all for your replies!

I only wanted to have the webrtc sources in a IDE for better debugging.
So I ended up parsing my CMake based project (which uses WebRTC native) with CLion and adding the webrtc source path as a gdb source path.

I am achieving good results with this and I'm able to step through the WebRTC sources in Linux.

You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/5MWS05rXkmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAHgZEq4H_NA9RJ5cHbsy%2B1%2BkuPjqWAJXQ9G5WbV6inNho%3DBMpA%40mail.gmail.com.

Shuai Zhao

unread,
Feb 4, 2019, 1:23:35 PM2/4/19
to discuss-webrtc
Hi Alex,

Would you please share some basic steps to import Webrtc to Clion and start to debug?

Best,
Shuai




--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------




--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/5MWS05rXkmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages