Control the library name prefix

The library is called zlib but when I look at the library artefacts pacman -Ql zlib:

zlib /usr/lib/libz.a
zlib /usr/lib/libz.so
zlib /usr/lib/libz.so.1
zlib /usr/lib/libz.so.1.3.1

I guess under linux you could use “z” as name and have the libz as name as the result? But yes, would be annoying having to special case between linux and windows, which I assume should end up with zlib.dll?