-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Unable to use picojson installed to /usr/include/picojson.h
#213
Comments
You are absolutely correct, https://github.com/kazuho/picojson/blob/111c9be5188f7350c2eac9ddaedd8cca3d7bf394/Makefile#L21 Do you have any suggestions on how we can support both? |
C++17 introduced Looking at the git blame, it seems like it originally included picojson without any prefix, but that got changed when we added vcpkg support, so we probably have to make sure we handle that case correctly. |
I believe the most flexible approach would be (but that needs some more changes):
That also fixes a second issue I have: as-is, I can't specify |
I think the idea was that the consumer would provide their own Perhaps that's a solution 🤔 jwt-cpp could provide a custom CMake module that searches both locations and setups the target correctly? You can write something similar to https://github.com/Thalhammer/jwt-cpp/blob/master/cmake/private-find-boost-json.cmake. I'd be glad to help 😉 I am not sure we can do that just yet... Would probably break Conan though 🤢 No clue about hunter or vcpkg There's a handful of action items to fix this (sadly it's not trivial).
|
That sounds like a good solution :-). My experience with hunter, conan or vcpkg is sadly zero, I have first heard of these in this project. As a quick hack, I have for now used the following approach in Gentoo packaging: I'm not sure I'll have sufficient time for a PR in the near future, but I believe the approach is a good one 👍 . |
The lack of a C++ ecosystem is to blame for that 😭 hopefully you next project can try out the package manager landscape I think the patch is good for packing, I did the same for Conan https://github.com/conan-io/conan-center-index/tree/master/recipes/jwt-cpp/all/patches 👍 Hopefully in the near future we can make a point release to improve that 🤞 |
More like the abundance of the same. Unlike most "cool new" programming languages, which have a single established build system and package manager/repository, c++ has tons of projects all trying to solve more or less the same problem (and all of them failing in different ways). I can come up with with 7 different build systems (cmake, scons, msvc, ninja, make, premake), 4 different package managers (hunter, conan, vcpkg, deb/rpm/pkg/whatevermicrosoftisdoing) and 3 major compilers in 9 variations (clang with libstdc++, libc++, musl, gcc with libstdc++, libc++, musl, msvc, intel c++, arm cc). And those are just the ones I can remember of the top of my head, I guarantee there are tons more. Some of that is useful (different compilers catch diffferent bugs, though one could argue its not a bug if the compilers all agree on the ?wrong? result), while others (like the abundance of package type) is just plain annoying. Not to mention that soon:tm: we will have to deal with the difference of c++ modules in addiftion to the current state, making it even more fragmented. I personally really like hunter since it is (or at least claims to be) crossplatform and solves many issues I had with others by building all the packages from scratch on your machine with the current compiler and build flags (including debug symbols) but thats just my personal take. |
Note for whoever gets to this first, #195 is closely related and we should write some docs to help the community |
/usr/include/picojson.h
/usr/include/picojson.h
Hi, I am installing the library through Conan with version and revision (both latest):
After installing, I ran into a very similar error where Am I missing something in the Conan installation? I.e. is there any CMake variable I have to set to explicitely install the default |
Describe the bug
picojson
defaults to installation into<prefix>/include/picojson.h
.However,
jwt-cpp
tries to include from<includepath>/picojson/picojson.h
which will not be used by a standardpicojson
installation.Desktop (please complete the following information):
picojson
installed from upstream via system packagedev-cpp/picojson
-gcc (Gentoo 11.2.0 p1) 11.2.0
The text was updated successfully, but these errors were encountered: