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

Add include directories to CMake SDL2 targets #68382

Merged
merged 2 commits into from
Sep 30, 2023

Conversation

alef
Copy link
Contributor

@alef alef commented Sep 28, 2023

Summary

None

Purpose of change

perryprog found the include dirs were missing in target definitions, so here they are.

Describe the solution

Add INTERFACE_INCLUDE_DIRECTORIES to FindSDL2*.cmake

Describe alternatives you've considered

Testing

Built in Visual Studio 2022 and VS Code in Docker Desktop WSL2 Dev Container. No attempt to run.
Let the CI build and see.

Additional context

@github-actions github-actions bot added Code: Build Issues regarding different builds and build environments json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Sep 28, 2023
@perryprog
Copy link
Contributor

Ha, beat me to it. One thing of note is that in my testing it was only SDL2_image that needed the extra property. I'm pretty sure this is just because (perhaps on macOS specifically) it ends up in a directory not picked up by FindSDL2. The rest incidentally line up on the default include path. I'm not totally sure what changed on my setup that only made CMake recently fail to build this, but regardless, this change compiles and runs for me.

@alef alef force-pushed the find-include-cmake branch from 1c220c5 to 9e96cd4 Compare September 30, 2023 13:33
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 30, 2023
@alef alef marked this pull request as ready for review September 30, 2023 14:58
@kevingranade kevingranade merged commit 74ff6cc into CleverRaven:master Sep 30, 2023
@alef alef deleted the find-include-cmake branch September 30, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Build Issues regarding different builds and build environments json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants