Currently meson build just does find_library('icu') when building libfreeciv. For comparison, autotools does pkg-config on icu-uc at configure time.
That current meson implementation has several shortcomings:
- It's awfully late to detect missing dependencies halfway through the *build* phase + resulting in obscure error messages (took me a while to figure out why the specific symbol was not available on that specific architecture, as the error told)
- It only does the library detection part. Include paths are not touched at all.
- It can break when icu needs special compile/link flags (like linking in its own dependencies). pkg-config would (at least in theory - if the icu packaging for the platform is done right) feed in all the correct flags
This is causing one of the build failures on homebrew/macOS meson builds on #45156
Currently meson build just does find_library('icu') when building libfreeciv. For comparison, autotools does pkg-config on icu-uc at configure time.
That current meson implementation has several shortcomings:
- It's awfully late to detect missing dependencies halfway through the *build* phase + resulting in obscure error messages (took me a while to figure out why the specific symbol was not available on that specific architecture, as the error told)
- It only does the library detection part. Include paths are not touched at all.
- It can break when icu needs special compile/link flags (like linking in its own dependencies). pkg-config would (at least in theory - if the icu packaging for the platform is done right) feed in all the correct flags
This is causing one of the build failures on homebrew/macOS meson builds on #45156