-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[build] CMake support #176
Comments
Hi @Leinnan, I'm not used to CMake... Someone created a CMakeList.txt, don't know if its ok... |
Any help on this issue is highly appreciated! |
Hello! I've done some work with CMake and I've got an example of what I did with raylib here: https://github.com/oswjk/raylib/tree/cmake I took a liberty of not using the binaries bundled in the git repository (in my opinion, they do not belong there). So my approach was to download and build the dependencies with CMake. I've tested this stuff on Xubuntu 16.04 (GCC) and Windows 10 (using MinGW) at the moment and all the dependency downloading and building seems to work fine. I need to create a little bit bigger skeleton to test all the audio stuff and other functionality so that they work also. I'm not fully satisfied with my changes yet and there is probably some stuff missing also. If someone wants to adapt this, your welcome :-) |
NICE! I will try check it out in two weeks because now I have to much work Can't wait to start working with Raylib :D 2016-09-26 20:46 GMT+02:00 Oskari Timperi [email protected]:
|
Hi @oswjk! Thank you very much for this great addition! Sorry, I'm not used to CMake build system... but I will try it, you can send me a pull-request if you want to integrate it into raylib develop branch. In terms of build system, on raylib develop branch I just added support for shared library compilation (check Makefile) and VS2015 preconfigured projects. Adding support for CMake is great! rayskeleton looks also very interesting! Don't know if I understand it correctly but it is a kind-of raylib-project CMake template ready to use, am I right? |
I'm not comfortable yet with integrating the CMake build system, as there are untested and missing things (RPi for example). I can test the RPi myself as I have one somewhere :-) I'm also not yet fully satisfied with the bootstrapping part of my additions. I need to think about it a bit more, if I could make it better. Rayskeleton is just that. A (hopefully) simple to use skeleton that you should be able to get up and running in no time. So basically you clone only the skeleton and the bootstrapping part takes care of downloading raylib and building it for you. The skeleton project uses my forked version of raylib, that contains the CMake build system. |
Hey @oswjk, would it be possible to centralize all CMake compiling files into a cmake folder? |
It's certainly possible while not very idiomatic for CMake style. I'm refactoring the CMake support to be in one directory currently. We'll see where it goes. :-) |
Do anyone know the Fips, a great CMake wrapper? CMake is IMHO too complex to use in such a situation(raylib designed for beginner and people who want to get start quickly), I'd highly recommend this awesome wrapper called |
Hi @oswjk! Thank you very much for the effort! :) Hey @pixelpicosean, I didn't know Fips... despite being simple to use, it implies adding a new (non-standard) tool and new dependencies (Python). As you stated, raylib is designed for complete beginners and people who want to get start quickly and not worry much about dependencies or code building. I also tried to simplify as much as possible the building system (plain Makefiles). CMake is a good addition (despite not being that intuitive, at least for beginners) because is a standard code building tool (and very popular on Linux environments), I know lots of (average-advance) user will feel comfortable with it. |
Hi @oswjk! What's the state of this feature? I'm planning to release a new raylib version in a couple of weeks and it would be great to include this addition (if possible). :) |
fwiw, FIPS has some great features to aid in cross-platformness: Fips is made by the same person that made Oryol. |
Initial references. Cmake Documentaion |
What do you guys think about using meson instead? It seems to be similar to write and maintain, also supports multiple platforms and seems to be pretty fast. Also it seems to be getting more and more popular. Since writing Cmake is not always easy, and this issue is open for quite a time, maybe looking into meson would be an alternative. If you guys are okay with it I would try to look into it. |
Actually meson is even nicer than I thought. One can test with:
So I only build Linux static/dynamic libs. If @raysan5 sais he is interested in switching to meson I would try to add the other systems so it has the same functionality like the current Makefile. However I don't have any Windows machine so I hope someone can help testing there, once the meson file is finished. One can already see that the meson file is much shorter, easier to read and extend. I strongly suggest switching. Also implementing library versioning, for #293, would be much easier in meson that in a pure Makefile AFAIK. |
Hey @jubalh! That's ok for me! Im not a big fan of CMake... in terms of building, just worked with Ant/NAnt in the past (for games building) and decided to stuck with plain Makefiles for raylib... Lately I saw premake and it seemed interesting but I havent checked it yet. Don't know about meson with ninja, I've been investigating a bit and ninja looks great! :) |
Just closing this issue, multi-platform building is being implemented in meson. |
Any chance for cmake support? It would make developing on Linux much easier.
The text was updated successfully, but these errors were encountered: