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 - MinGW sdl2-config.cmake produces bogus Makefiles
Summary: MinGW sdl2-config.cmake produces bogus Makefiles
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.12
Hardware: All Windows (All)
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-28 16:21 UTC by Ethan Lee
Modified: 2020-04-28 16:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.