Make SDL2_INCLUDE_DIR point to the root #381
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:SDL2/
prefix (yay)SDL/
. Fortunately that's "just" an#ifdef
.SDL2/
prefix. One option would be to detect this via CMake and then expose that in the globalconfigure.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.