[MinGW] Do not deploy files to /usr/cmake #7759
Merged
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.
This PR introduces a command into the MinGW setup script that comments two lines in the SDL2 Makefile, preventing the script from creating the
/usr/cmake
directory and deploying files to it.Normally, the script deploys these two files:
/usr/cmake/sdl2-config.cmake
/usr/cmake/sdl2-config-version.cmake
These files appear to be unnecessary for compiling using MinGW compilers, but their presence does cause problems when attempting to build using native gcc compilers.
I encountered several warnings during CMake configuration when these files were present. This happens during first time configuration after having run the
Packaging/windows/mingw-prep64.sh
script, so you may not encounter this error if you have files already in your build folder or if you haven't tried building using MinGW compilers. The warnings all look very similar to the following.After seeing this warning, I encountered an error when attempting to build.
Anyone who has encountered these warnings/errors after having compiled this project using MinGW compilers should check their
/usr/cmake
directory. Likely, you can just delete the whole thing since SDL2 seems to be the only library that uses it. Here is a safe way to handle it.sudo rm /usr/cmake/sdl2-* sudo rmdir /usr/cmake