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 pkgconfig file #1147

Open
wants to merge 4 commits into
base: cpp_master
Choose a base branch
from
Open

Add pkgconfig file #1147

wants to merge 4 commits into from

Conversation

simonspa
Copy link

@simonspa simonspa commented Nov 5, 2024

This allows msgpack installations to be detected via pkg-config

(cc) @stephanlachnit

"-L\${libdir}"
)
SET(PKG_CONFIG_CFLAGS
"-I\${includedir}"
Copy link

@stephanlachnit stephanlachnit Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incomplete, since this misses the compilation flags. This is actually a bit tricky and why I never went further.

The obvious ones are the target compile option (MSGPACK_USE_X3_PARSE needs fixing since it is set via CMAKE_CXX_FLAGS), the more tricky one is that you actually also needs to handle the Boost deps here.

There are two options:

  • export all the Boost flags to the .pc file (if there are any, would have to be checked)
  • never enable Boost (not nice since it breaks common workflows)

I would also move the default -I and -L flags directly in the pkg-config file as well, since they are static anyway and really only clutter the CMakeLists.txt

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.

2 participants