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

RFC: meson: add mesonbuild support #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pabigot
Copy link
Contributor

@pabigot pabigot commented Jun 24, 2018

I recognize there's enough complexity trying to maintain both CMake and Makefile, but meson has a few benefits including trivial support for Google Test and doxygen, and better provision of dependencies in pkgconfig than CMake.

Using AMQP-CPP as a subproject in a meson-based application becomes a simple matter of dropping something like the following as subprojects/amqpcpp.wrap:

[wrap-git]
directory = amqpcpp
url = /mnt/devel/external/RabbitMQ/AMQP-CPP
revision = dd00810f7fa3cc88470c52b274ea65c333cb5d66

and adding this to the project meson.build:

amqp_dep = dependency('amqpcpp',
                      default_options: [
                        'linux-tcp=true',
                      ],
                      fallback: ['amqpcpp', 'amqpcpp_dep'])

I've only tested this on Linux and with linux-tcp set.

If this is something that could be merged, I'd be happy to add some documentation. The primary value to this project of merging it is Google Test support; secondarily it might help with #208. If it's not wanted I'll maintain it myself or submit it to wrapdb.

Version 1:
- No support for building examples.
- Builds shared by default, use `--default-library static` to build
  static.  No dual build until meson 0.46 (--default-library both).
- Better pkgconfig support (adds dependencies not accessible in CMake).
- Doxygen support.
- GoogleTest support (with example tests).
@EmielBruijntjes
Copy link
Member

I'm happy to merge this if that helps you, but the problem that I have with these kind of PR's is is that I do not use this technology, and I am also not familiar with it. I can therefore not maintain it or can judge what the quality of it is.

So I wait a little while to see if there are others who think this is helpful too before I press the merge-button.

@pabigot
Copy link
Contributor Author

pabigot commented Jun 24, 2018

It also adds a step for @RafalGoslawski as the version number needs to be updated in meson.build when a release is tagged.

I agree this should depend on interest from the rest of the user community.

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