-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add header-only Meson support #955
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
Conversation
This allows users to call `dependency('httplib')` and have the include directory automatically configured
@Tachi107, thank you for your pull request, but I am probably not taking it... Please see this comment. |
Yep I saw it, but this is to allow Meson users to use the project more easily, it doesn't change the repo's workflow |
It works like this: users can add this repo as a git submodule in a folder called executable(
'my-program',
sources: 'main.cpp',
dependencies: dependency('httplib')
) |
@Tachi107, thanks for the comment. Please see the former discussion about the current CMake support, so that you would understand what I was trying to say. As for CMake, I don't touch it at all, but @sum01 has been kindly and faithfully maintaining it for me up till now when any requests or problem reports come. Likewise, if you would like to accept the same responsibility regarding the Meson support, I am glad to merge it. Please let me know your answer. Thanks for your understanding! |
I implemented only the bare minimum, so it wouldn't be hard to maintain; happy to accept the responsibility :) Before merging I have a question though, how should the project be called? "cpp-httplib" or "httplib"? |
@Tachi107, great! I chose "cpp-????" as cmake project names in other cpp projects (cpp-peglib, cpp-fstlib and so on). But the current CMakeLists.txt maintained by @sum01 sets the project name to "httplib". So you can pick either one, since I don't have a strong opinion about it. :) |
I prefer "cpp-httplib" as it is the same name as the repo, and makes Meson's automatic fallback work without issues. Ready to merge! |
I have just merged it. Thanks for the fine contribution! |
* Add header-only Meson support This allows users to call `dependency('httplib')` and have the include directory automatically configured * Rename `httplib` to `cpp-httplib`
This allows users to call
dependency('httplib')
and have the include directory automatically configured.This doesn't add any advanced functionality (as you can see by the diff) so there's nothing to maintain (unless you move
httplib.h
in a separate directory; in that caseinclude_directories('.')
should be changed toinclude_directories('newdir')
). In fact, it only makes users' life simpler :)