Skip to content

Detection of libiconv failing on msys2 mingw64 #15440

@jgmdev

Description

@jgmdev

Context

Hi, on the pragtical code editor project we use meson and its cmake submodule to automatically build windows binaries (that include sdl3) using GitHub CI. The editor uses sdl3 built-in iconv wrapper to perform encoding conversions of text files.

Issue

Just recently a user reported that conversion from GB18030 to UTF-8 was failing, I noticed that we weren't explicitly enabling -DSDL_LIBICONV=ON on our configuration so I enabled it and made sure that mingw-w64-x86_64-libiconv was installed. While re-compiling I noticed that CMake always failed to detect libiconv, SDL_LIBICONV was reported as Wanted: ON but it was always turned off... In order to make it work I had to force -DHAVE_ICONV=1 and -DHAVE_LIBICONV=1 and do the usual manual linking (-liconv).

Reporting in case this is a CMake script issue that needs fixing on the SDL3 project.

References

Some Info

SDL Version: 3.4.2
Platform: Windows
Build System: msys2 mingw64

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions