Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing pkg_config_defines when built with CMake #4545

Merged
merged 2 commits into from
May 12, 2023

Conversation

panicgh
Copy link
Contributor

@panicgh panicgh commented May 9, 2023

The pkg_config_defines variable was only set in configure.ac, but not in CMake. This lead to the -DZMQ_BUILD_DRAFT_API=1 flag to be omitted from the generated pkg-config file.

configure.ac contains this to set the variable accordingly:

libzmq/configure.ac

Lines 1056 to 1063 in 532b612

if test "x$enable_drafts" = "xyes"; then
AC_MSG_NOTICE([Building stable and legacy API + draft API])
AC_DEFINE(ZMQ_BUILD_DRAFT_API, 1, [Provide draft classes and methods])
AC_SUBST(pkg_config_defines, "-DZMQ_BUILD_DRAFT_API=1")
else
AC_MSG_NOTICE([Building stable and legacy API (no draft API)])
AC_SUBST(pkg_config_defines, "")
fi

The pkg_config_defines variable was only set in configure.ac, but not in
CMake. This lead to the `-DZMQ_BUILD_DRAFT_API=1` flag to be omitted
from the generated pkg-config file.

Signed-off-by: Nicolas Benes <nbenes.gh@xandea.de>
@bluca
Copy link
Member

bluca commented May 9, 2023

Please add a relicense statement https://github.com/zeromq/libzmq/tree/master/RELICENSE

Signed-off-by: Nicolas Benes <nbenes.gh@xandea.de>
@bluca bluca merged commit cc12997 into zeromq:master May 12, 2023
20 checks passed
@panicgh panicgh deleted the pc-file-fix branch May 13, 2023 08:14
panicgh added a commit to panicgh/libzmq that referenced this pull request May 16, 2023
PR zeromq#4545 sets `pkg_config_defines` too late, i.e. after the pkg-config
file is already generated. It must be set before `configure_file`.
panicgh added a commit to panicgh/libzmq that referenced this pull request May 16, 2023
PR zeromq#4545 sets `pkg_config_defines` too late, i.e. after the pkg-config
file is already generated. It must be set before `configure_file`.
bluca pushed a commit that referenced this pull request May 16, 2023
PR #4545 sets `pkg_config_defines` too late, i.e. after the pkg-config
file is already generated. It must be set before `configure_file`.
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.

None yet

2 participants