-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop gyp, move to CMake #359
Comments
Current worker deps:
Out of these, I'd say OpenSSL is the trickiest one. An option would be to move to BoringSSL, which does support CMake out of the box. The rest are pretty small and writing CMakefiles for them should be trivial. |
Wow, thanks! BTW:
|
It already has the necessary APIs for QUIC unlike OpenSSL (still in PR) so maybe it's a sign from, the future! 😎 |
Please correct me if I am interrupting or misunderstanding, this is just a friendly attempt to contribute. I copied this from the BoringSSL Git 1:
|
I am trying to move mediasoup to cmake. I have made some attempts and it should be successful (mediasoup-cmake) |
Interesting, This will be very useful for us. Just wondering: Did you use BTW I tried it in OSX and it seems to work, but I get these warnings:
|
Yes, I used openssl-cmake. Now the mediasoup-cpp worker can only be compiled and run. It has not been rigorously tested. I will continue to improve it later (for example, there are some compilation options not added, I am not sure What question), now I just hope it can help you. |
Thanks, don't hesitase in updating this issue with your progress, please. |
Hi @barry-ran, I see that mediasoup-cpp is a separate project, not a mediasoup branch. Could you please make it a mediasoup branch (out of current mediasoup v3 version) so it's easier to compare, collaborate and actually merge? We would like to put some efforts on this. Thanks |
Hi @jmillan , |
👍 |
Hi @jmillan ,
It has not been rigorously tested. There are some compilation options not added, I am not sure What question (Because I don’t know much about these options). |
Thanks @barry-ran |
Hi @barry-ran, I'm getting the following error when trying to compile your branch: Such file is not present in |
Hi @jmillan ,
|
@barry-ran I tried to compile your branch on Windows with Visual Studio 2017, but CMake gave me the following error during configuration
To fix this, I had to move the cmake_minimum_required(VERSION 3.16)
set(PROJECT_NAME "mediasoup-worker")
project(${PROJECT_NAME})
... Afterwards I was able to configure and build with CMake cmake -S . -B build -G "Visual Studio 15 2017" -A x64
cmake --build build --config Release Finally, I had to copy |
Hi @barry-ran, Sorry for the long time without feedback. Would you be willing to make a PR agains current v3? |
I've just tried and had the same issue @mabuchner had. |
try this?
|
Ok i will do it |
Thank you! |
I tried cmake -S . -B build -G "Visual Studio 15 2017" -A x64 -D CMAKE_INSTALL_PREFIX="build/install"
cmake --build build --config Release --target install The CMake summary says
But as before nothing was installed. |
I rebased current v3 and fixed some error, this pr
mediasoup-worker.exe and uv.dll is installed in the ./dist/lib/Debug directory (usrsctp is static now) |
BTW, was Meson under consideration? |
We want something that it's already integrated into most of the C/C++ libraries used by mediasoup. Meson is not. |
I'm far from either of those, but it seems like using CMake projects in Meson is relatively straightforward: https://mesonbuild.com/CMake-module.html So you'd use dependencies that already have CMake support as is. |
I don't even know CMake so I'm not gonna learn Meson to integrate CMake into it XD |
I found this option for OpenSSL: https://github.com/viaduck/openssl-cmake |
Late thanks, @nazar-pc. Unclear whether such a OpenSSL will come with the optimized build options that have been merged into mediasoup today. Will see when we come back to this topic. |
I'm learning CMake to make this happen, but approaching from a different angle. GYP can actually produce CMakeLists.txt files, with current GYP config it actually produces two (Release and Debug). After minor tweaks it seems to build most of the stuff just fine as is. I'll try to combine both files into one and then swapping explicit instructions for building dependencies with includes/imports/whatever it is called in CMake. That will make ensure there is a working build all along and wouldn't necessarily block CMake introduction on upstream CMake support on every dependency too much. I'll see where it goes, but no promises, no ETA. |
Are you learning CMake? 😀😀😀😀 |
Just in case, here another approach: #602 |
If some of subscribed to this issue have time to look at and maybe even test #622, it would be very helpful! |
Rationale:
gyp
.libuv
is droppinggyp
.xxx.gyp
forlibsrtp
,usrsctp
and more deps we use, while those libraries do supportCMake
out of the box.gyp
issues in Windows that nobody fixes (even if reported ingyp
project) and affect mediasoup (see [Windows] Parent project GUID not found in "mediasoup-worker" project dependency section #345 and [Windows] Support for Visual Studio 2019 #347).So let's move to
CMake
:CMake
version available in most common platforms (Debian, Ubuntu, OSX, etc).CMake
version since some of its features are not implemented by most common versions such as 3.7.Ping @saghul because I can.
The text was updated successfully, but these errors were encountered: