This is a backport of: https://github.com/zeromq/libzmq/pull/4706.
Similar to #30488.
Addresses #29723 (comment):
Looking at the mingw .pc generated by this PR:
0Libs: -L${libdir} -lzmq 1Libs.private: 2Requires.private:
It looks like we’ll need to take zeromq/libzmq#4706 as well for CMake. That can be done as a follow-up though, as it’s not yet merged upstream.