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

Copied SDL_ttf.h also to .emscripten_cache/asmjs/ports-builds/sdl2/in… #5393

Closed
wants to merge 1 commit into from

Conversation

RICCIARDI-Adrien
Copy link

…clude/SDL2 to get the same architecture than Debian/Ubuntu SDL2 packages.

This commit fixes the issue I opened here : emscripten-ports/SDL2_ttf#1

…clude/SDL2 to get the same architecture than Debian/Ubuntu SDL2 packages.
@kripken
Copy link
Member

kripken commented Jul 24, 2017

cc @TheKK who created the sd2-ttf port.

@TheKK
Copy link
Contributor

TheKK commented Jul 25, 2017

On Debian the SDL_ttf.h file is included this way : #include <SDL2/SDL_ttf.h>
With emscripten the include must be modified in : #include <SDL_ttf.h>

As I know, the common way to solve this problem is by adding -I/usr/include/SDL2 flag while compiling your project into native machine code, and adding nothing else for emscripten build. With this technique you should be able to use #include <SDL_ttf.h> for both native and emscripten build without modify your code base.

Btw, using pkg-config would be the conventional way for specifying compiler flags in different environment.

If I misunderstand anything please let me know :)

@RICCIARDI-Adrien
Copy link
Author

Hi,
You're right, sdl2-config --cflags is also working fine to get the include directories. My pull request was targeted to source code not using the aforementioned ways to determine includes path. As include/SDL2 directory was existing yet in the emscripten cache, I though it was more coherent to provide SDL_ttf.h from this directory too, like it's done in Debian.

@RICCIARDI-Adrien
Copy link
Author

Hi,
Do you plan to merge this pull request ? If you prefer not, no problem, you can close it (you have enough pull requests to care with !).

@kripken kripken closed this Nov 7, 2018
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.

3 participants