Skip to content

Export stable Azmq::libzmq target#222

Open
ialexyi wants to merge 1 commit intozeromq:masterfrom
ialexyi:fix/export-stable-libzmq-target
Open

Export stable Azmq::libzmq target#222
ialexyi wants to merge 1 commit intozeromq:masterfrom
ialexyi:fix/export-stable-libzmq-target

Conversation

@ialexyi
Copy link

@ialexyi ialexyi commented Feb 12, 2026

Create INTERFACE IMPORTED target instead of aliasing PkgConfig::LIBZMQ to avoid exporting pkg-config targets in azmq's exported configuration.

When azmq creates an ALIAS to PkgConfig::LIBZMQ, the pkg-config target gets included in azmq's exported CMake config, causing downstream builds to fail when pkg-config results differ between environments.

This patch copies the properties from PkgConfig::LIBZMQ into a new INTERFACE IMPORTED target to break the dependency on pkg-config in the exported configuration.

The implementation includes null checks for robustness and copies all relevant INTERFACE_* properties including link libraries, include directories, compile options, compile definitions, and link options.

Create INTERFACE IMPORTED target instead of aliasing PkgConfig::LIBZMQ
to avoid exporting pkg-config targets in azmq's exported configuration.

When azmq creates an ALIAS to PkgConfig::LIBZMQ, the pkg-config target
gets included in azmq's exported CMake config, causing downstream builds
to fail when pkg-config results differ between environments.

This patch copies the properties from PkgConfig::LIBZMQ into a new
INTERFACE IMPORTED target to break the dependency on pkg-config in
the exported configuration.

The implementation includes null checks for robustness and copies all
relevant INTERFACE_* properties including link libraries, include
directories, compile options, compile definitions, and link options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant