Skip to content

Full Meson support #1033

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

Merged
merged 2 commits into from
Sep 4, 2021
Merged

Full Meson support #1033

merged 2 commits into from
Sep 4, 2021

Conversation

Tachi107
Copy link
Contributor

@Tachi107 Tachi107 commented Sep 2, 2021

cpp-httplib can be now built with Meson even in compiled library mode.

The library is built with LTO, supports OpenSSL, zlib and Brotli, and the build system also generates a pkg-config file when needed.

Compared to the CMake file this one is quite small (more than five times smaller!), and maintaining it won't be an issue :) (and I'll keep maintaining it as I promised)

Edit: Note that I set the project version to 0.9.4 even if the released version is 0.9.3 so that when you'll release again (hopefully soon, so that people can use the improved Meson support) you'll don't have to update that yourself

cpp-httplib can be now built with Meson even in compiled library mode.

The library is built with LTO, supports OpenSSL, zlib and Brotli,
and the build system also generates a pkg-config file when needed.

Compared to the CMake file this one is quite small (more than five times
smaller!), and maintaining it won't be an issue :)
@yhirose
Copy link
Owner

yhirose commented Sep 2, 2021

@Tachi107, thanks for the contribution, but I can't accept this pull request because the file embeds the version number string. Could you take look at #505 where @sum01 did an excellent job to support automatic versioning to CMake?

@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 2, 2021

Hi, I can't implement the same thing with Meson, as it requires that project() is called before any other function. The only way to set a project version from an external file is to have a plaintext file containing just the version number in the repository, but that would also require to be manually updated.

If you prefer I can remove the version number from project() and use a similar approach to the one used in CMake, but having the version directly in project is more convenient (it automatically sets library version / soname, pkg-config version, and allows users using cpp-httplib as a subproject to look only for a specific version of the library).

If you decide to keep it, I will watch the releases and every time a new release is made I can submit a PR updating the version number in advance

@Tachi107
Copy link
Contributor Author

Tachi107 commented Sep 3, 2021

Hey @yhirose, edited as you requested :)
Ready to merge!

@yhirose
Copy link
Owner

yhirose commented Sep 4, 2021

@Tachi107, great. Thanks for your fine contribution!

@yhirose yhirose merged commit e20ecd2 into yhirose:master Sep 4, 2021
@Tachi107 Tachi107 deleted the meson-full branch September 4, 2021 15:57
@yhirose yhirose mentioned this pull request Jan 21, 2023
ExclusiveOrange pushed a commit to ExclusiveOrange/cpp-httplib-exor that referenced this pull request May 2, 2023
* Full Meson support
cpp-httplib can be now built with Meson even in compiled library mode.

The library is built with LTO, supports OpenSSL, zlib and Brotli,
and the build system also generates a pkg-config file when needed.

Compared to the CMake file this one is quite small (more than five times
smaller!), and maintaining it won't be an issue :)

* meson: automatic versioning
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