Skip to content
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] Set PLATFORM to Web by default when configuring web builds with emcmake #4748

Merged

Conversation

gilzoide
Copy link
Contributor

@gilzoide gilzoide commented Feb 1, 2025

This PR improves the CMake web build by setting the PLATFORM to Web by default when configuring builds using emcmake cmake.
This solution is the same as 9821725 wanted to achieve, but for it to work the value must be set before enum_option(PLATFORM ...) is called, that's why it didn't work before.

My only doubt is if it's best to just set the default value like I did, or if it makes sense to force PLATFORM to Web and only call enum_option(PLATFORM ...) in the else() branch, since Emscripten cannot build raylib with any other value of PLATFORM set.

@raysan5 raysan5 merged commit 5a254e3 into raysan5:master Feb 2, 2025
4 checks passed
@raysan5
Copy link
Owner

raysan5 commented Feb 2, 2025

@gilzoide Thanks for the review!

@gilzoide gilzoide deleted the feature/emscripten-auto-platform-web branch February 2, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants