We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5115

Summary: MinGW sdl2-config.cmake produces bogus Makefiles
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: buildAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 2.0.12   
Hardware: All   
OS: Windows (All)   

Description Ethan Lee 2020-04-28 16:21:35 UTC
When using SDL2-devel-2.0.12-mingw with CMake, builds will fail to start, only producing a mysterious "*** target pattern contains no '%'.  Stop."

I found out that the "if(NOT TARGET SDL2::SDL2)" block added in 2.0.12 is the root cause. Deleting this entirely gets builds to work again.

You can test this with both FAudio and FNA3D:

https://github.com/FNA-XNA/FAudio
https://github.com/FNA-XNA/FNA3D

Both builds are as simple as `mingw32-cmake .. && mingw32-make`, they should depend on nothing more than SDL2. I tested this on CentOS with the files provided by libsdl.org as well as Fedora's built-in mingw32/64-SDL2 packages.