binutils provided by MSYS2 has a patch to revert a commit that imo should not have been done upstream.
Unpatched windres will fail if include directories set in CMake (or anything) include a space in it, because the path escape will be stripped by windres before it calls cc1.exe.
So you end up with this for example when running in CMD:
windres -I "some thing" -i in.rc -o out.obj
cc1.exe: fatal error: thing: No such file or directory
Yes having spaces in include paths is bad, but I did not write the code in question that way.
The patch is here.
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-binutils/2003-Revert-Restore-old-behaviour-of-windres-so-that-opti.patch
Also see:
https://sourceware.org/bugzilla/show_bug.cgi?id=4356
https://sourceware.org/bugzilla/show_bug.cgi?id=27594
binutils provided by MSYS2 has a patch to revert a commit that imo should not have been done upstream.
Unpatched windres will fail if include directories set in CMake (or anything) include a space in it, because the path escape will be stripped by windres before it calls cc1.exe.
So you end up with this for example when running in CMD:
Yes having spaces in include paths is bad, but I did not write the code in question that way.
The patch is here.
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-binutils/2003-Revert-Restore-old-behaviour-of-windres-so-that-opti.patch
Also see:
https://sourceware.org/bugzilla/show_bug.cgi?id=4356
https://sourceware.org/bugzilla/show_bug.cgi?id=27594