-
Notifications
You must be signed in to change notification settings - Fork 36
Fix SDL2 header access issue #316
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
Conversation
Hi, We had merged the PR adding the smallpt example based on SDL2 and it worked very smoothly when done locally. This is because it wasn't the first time I was building xeus-cpp-lite with the sdl2 enabling flag and everything works perfectly the second time on. Why is that because we have this
Now here USE_SDL2 does fetch the sdl2 ports ( sdl2 files/libs aren't provided by emsdk by default, they need to be fetched) Hence we need to make sure we fetch the ports even before the link step (so that include has access to SDL2 being loaded and at linktime, the SDL2 lib i.e libSDL2 is already present) Many ways to do this
I've used approach 2 to fetch the sdl2 ports which needs to be done before any preloading. As can be seen here we fetch sdl2 ports successfully even before building. |
We could have obviously cut down to just SDL which is provided by default but I think its good to provide SDL2 access to the users. |
49dd338
to
405f33b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #316 +/- ##
=======================================
Coverage 81.78% 81.78%
=======================================
Files 20 20
Lines 950 950
Branches 87 87
=======================================
Hits 777 777
Misses 173 173 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM...
405f33b
to
00f2db6
Compare
Description
Fix #301
Type of change
Please tick all options which are relevant.