-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 build system & better building docs #336
Comments
About RPI, only supporting Raspbian for the moment, actually only tested on that platform, and not using X window system, OpenGL ES runs directly at hardware level through EGL, that's different than other Linux distros (Desktop Linux). It could work over X windows with the newly included (experimental?) OpenGL driver but not configured for that and it only works on RPI 2 and 3. |
Awesome work! I've yet to sit down with this stuff but it looks great. Thanks! |
@RDR8 What I could use help with most at the moment might be the non-Desktop targets. All the necessary stuff for them should be in the Makefiles, but I could use some help pulling them out and figuring out the exact build steps. |
@raysan5 Could you tell me more about your build environment? I'm having a real hard time on Windows trying to get GLFW setup and for CMake to place nice here (something about how it can't find |
I have a Pi to play with. It'll be the weekend or after before I can punch in. I would like to tinker with Android also but am not set up with adb or any sacrificial hardware. I am especially interested in alternative ARM SBCs. I need to research the toolchains before diving in. Anyway, yeah, I'll look into this. Thanks |
I don't think the RPi target should be too much different from the Linux one. Since... well... it's also Linux. |
Good news. All of the |
@raysan5 Aside from your Windows dev environment, can you get me a list of all possible compilation flags e.g. |
To all of you, just say thanks for such an amazing work, despite CMake is not my preferred build system, undoubtely, this addition will represent a huge boost for raylib project. About internal flags to configure raylib, just check #200 |
Oh man, that's going to be a lot of flags to mess with. What do you think are the most important ones to be able to configure? So far I've got:
I don't think adding options for all of the |
Can anyone else comment on how building for Android is supposed to work? Last time I ever toyed with Android development was back before university, and that is when the API was at 2.x. Does the NDK create a .jar of raylib where we can write the raylib game in Java? Or does it compile the whole game (written in C) to the .apk? I have no idea what I'm doing when it comes to Android. |
Does this look useful to us: https://github.com/taka-no-me/android-cmake ? Once again, I have absolutely no idea what I'm doing when I'm working with Android. |
From "Getting Started with the NDK" |
About configuration flags, they are exposed only for advance users to allow them to have full control over library requirements. No need to support all of them, with About Android building, first raylib needs to be build as a .so library, to do that a standalone Android toolchain is required. To build the final |
Okay, latest update is now there is a way to configure the build As per issue #337 should I have it disable GL ES 2.0 on desktop? |
Latest update is that I've gotten the web library |
@raysan5, do you plan on developing using makefiles directly? I would hate to lose them. And be forced to create them using cmake, which gives you super bloated and overly complicated makefiles, in my experience. |
@tazdij, no plans to replace/remove direct Makefiles. I like them, I think they are pretty easy to read and Makefiles are still the only build system I feel I have full control over it. I've analyzed most of the build systems out there and Makefiles are probably the simplest option (aside of plain command-line scripts). But it's true that lots of users feel comfortable with CMake so I think it could be a great support this alternative build system. |
@raysan5 How do you feel about the CMake files I've written so far? If you don't think you understand what's going on, I wouldn't mind sitting down with you in IRC (or IM) to run it through you step by step. It's pretty simple so far. (Still don't have the Windows though....) |
@RDR8 Any headway made on the Pi platform? |
Negative, sorry. Playing an impromptu game of Frogger in real life and don't have any study time. A return to normalcy is likely some days away. I have been following your progress and I do really appreciate your efforts here. Your keyboard is on fire. |
@raysan5 thank you for the response, I am also more comfortable with Makefiles. And having both build systems should allow for more people to have the build environment they enjoy, also enabling developer to use their preferred IDE as an actual IDE instead of a glorified text editor. (I code in GNU Edit and vi so this doesn't appeal to me) @define-private-public This is some amazing work so far, I would like to see CMake as an alternative build system included in the release builds of raylib. I would most likely not use it myself though. |
@define-private-public, thanks for all your work, it's impressive. CMake code is pretty clear to me. Excuse me if I haven't been too active lately, I should took care of some personal matters and next Monday I'm going on holiday for 15 days. Lots of pending things... I'll try to get it done by September to release a new version, before academic course starts; this year there are several universities using raylib. |
Hey @raysan5, my interest in working on this is starting to wane. a few reasons:
If you're interested in merging what I have right now, I'm still willing to write up docs for how to use the CMake files. |
Hi @define-private-public, you get so far on CMake implementation, don't worry, just send a pull request and I'll integrate it into main repo to let other people continue with it. About your doubts, Windows and RPI shouldn't be an big issue, Android is a bit more complex, I'm also dealing with it to build examples into APK. I saw you did a great work with the Nim binding, about your issue, I faced some similar problem with Lua binding and just defined the type as opaque data, don't know if that's possible with Nim... |
PR for what I have is right here: #348 Feel free to edit my main comment since it's a task list. If anyone else replies to this ticket I'll still monitor it. I can provide guidance for CMake if anyone needs it. |
I'm working right now on a branch of this that will build all of the stuff in this repository using CMake. Working on issues #332 and #328, alongside problems with linking dynamic vs. static GLFW have prompted this. I've been doing the work here: https://github.com/define-private-public/raylib/tree/cmake_test
Right now, it's at a state where you can do this and have raylib working with examples:
mkdir build
cd build
cmake ..
orcmake -DSHARED_RAYLIB=ON ..
make -k
And you're good to go!
I primarily work on a Linux machine (Ubuntu), and have very limited knowledge of OS X, so any help with Windows is appreciated. For the moment, I'm working on the desktop targets, but Android, Raspberry Pi, and Web will be added in for completeness.
Build TODO List:
.so
.dylib
games/
)We also need to update the documentation for dependencies to build, and how use the
.a
and.so
/.dylib
/.dll
files that are made.Docs TODO:
libraylib.a
libraylib.so
on Linux (w/run.sh
shell script)libraylib.dylib
on OS X (-Xlinker -rpath .
)raylib.dll
on Windowslibraylib.bc
for web (need to activate the emsdk first)Other TODO:
examples
andgames
, figure out a way how to reduce the duplication of code?.gitignore
file. I have already had to touch it. Some files were being skipped over that shouldn't have!!Makefile
sgames
andexamples
libraylib.bc
Questions I have for others (right now):
The text was updated successfully, but these errors were encountered: