-
Notifications
You must be signed in to change notification settings - Fork 392
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
Add basic Linux+CMake support! #31
base: master
Are you sure you want to change the base?
Conversation
Still TODO: main is still under windows-only flags, create a linux version?
Looks good -- I didn't test it. I'd take it you are using CMake because you are using CLion. That goes against Cherno conventions though as this community is using the latest Premake. |
hello can you please tell me how I can compile and run on a MacOS? |
I know premake is the standard here. I was thinking that maybe the two don't have to be mutually exclusive. I've seen projects that support multiple build systems. |
Not sure what could be the problem but while working on this I found out that the GLFW fork used for Walnut is only tested on Windows so I had to patch it for Linux. My guess is that it should be appropriately patched for OSX as well so I suggest you start looking there. |
got that , I had no idea this could have been the problem , thanks ill look into it and try to get it to work |
@valerioformato Thank you for this PR! This is exactly what I was looking for: CMake and Linux support. I'm hoping this project will become more cross-platform focused in the near future rather than just Windows. |
The CMake configuration worked giving me a successful build. Running the program gave me a window flashing on the screen and a core dump crash. I tried it. The Premake file is unmodified and doesn't produce results on my Linux system. It'd probably be best to remove that file from this CMake Linux project branch to avoid confusion. |
Did you also use the patched version of GLFW as stated in the PR description? I am not sure about removing the premake files, the hope for this PR is to be merged in, lots of people on the windows side rely on those :) |
Update base
Pulled this in on Windows using CLion and it worked beautifully, thank you :) |
Why not also use premake for the linux side? |
Because I have a CMake project that uses Walnut as a dependency. This way I can integrate it seamlessly. |
This PR adds support for building Walnut under Linux using CMake.
The build configuration follows very closely the premake one.
On the Walnut side the only thing missing was an entrypoint. The remaining 90% of the work was just writing the CMake build files, basically translating the premake build :)
Tested under Arch Linux, with Vulkan SDK version 1.3.224, CMake 3.24.2
NOTE: this patch also requires a fix in the GLFW submodule, see corresponding PR in the GLFW repo