Open jwmelto opened 1 year ago
Doesn't this commit address that? https://github.com/zeromq/libzmq/commit/c079ca5cc44f3a485a05e6af4cc60c40ec528838
I might be wrong, but I'm basing this off your example
See cppzmq for an example of how to fix this.
Looks like it. The CMake config files are still inadequate but that's probably a separate issue.
Any idea when a release including that fix will be available?
This update may be available in release 4.3.5?
Albeit building with the latest sources and some non-default build options, this was built with the cmake tooling under a test build:
$ cat /usr/local/stow/libzmq-latest-24-04-05-00/lib64/pkgconfig/libzmq.pc
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/lib64
includedir=/usr/local/include
Name: libzmq
Description: 0MQ c++ library
Version: 4.3.6
Libs: -L${libdir} -lzmq
Libs.private: -lstdc++ -lrt
Requires.private: gnutls libbsd libsodium openpgm-5.2
Cflags: -I${includedir} -DZMQ_BUILD_DRAFT_API=1
Issue description
When building with CMake, the generated pkg-config file does not include compiler defines.
Environment
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
What's the expected result?
By inspection, the
autotools
config setspkg_config_defines
when draft API is enabled (here). TheCMakeLists.txt
file does not. Whenlibzmq.pc.in
is processed, the empty (undefined)pkg_config_defines
is substituted, resulting in an improper configuration.See cppzmq for an example of how to fix this.
ENHANCEMENT
The CMake exported target should include all properties (including COMPILE_DEFINITIONS). GNU Radio has an example of wrapping ZMQ in a modern CMake export; extending this model would be awesome