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

Make SDL2_INCLUDE_DIR point to the root #381

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mosra
Copy link
Owner

@mosra mosra commented Oct 16, 2019

So people using custom buildsystems don't need to add SDL2/ into the include path, and also would make a vcpkg patch obsolete. However, it's ... an unsolvable mess:

  • Sane distributions and packages have includes with a SDL2/ prefix (yay)
  • The Emscripten SDL1/2 hybrid uses SDL/. Fortunately that's "just" an #ifdef.
  • The Windows binary SDL distribution has the includes without the SDL2/ prefix. One option would be to detect this via CMake and then expose that in the global configure.h, but that's very ugly. Another option would be to use __has_include(), but on the only system where this matters, MSVC supports that only since 2017 17.3 or something, would need to have an ugly fallback on older versions.

Keeping it as-is right now, may revisit this when I get a better idea on how to fix it.

So people using custom buildsystems don't need to add SDL2/ into the
include path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant