Comments (13)
Or perhaps there's a simpler solution, namely that 'binary' package builders (conda, rpm, debian) should ignore the cmake configuration and use just
install -d ${PREFIX}/include/jwt-cpp
install -p include/jwt-cpp/*.h ${PREFIX}/incude/jwt-cpp/
or something like that.
from jwt-cpp.
This option is primarily for consumers who are using a C++ package manager like Conan which is capable to generating the cmake config for you. I believe vcpkg is capable of it as well 😄
Other wise you will need to provide your own "cmake wrapper" for picojson for the find_pacakge()
to work correctly.
from jwt-cpp.
There are some system directories which cmake checks for packages. You could simply put a valid cmake configuration there. But really this is something picojson should deal with.
Do you really need to use an external picojson ?
That "build" is only required for the test suite, so just adding the include dir of jwt-cpp to your project should be enough, as it is header only.
from jwt-cpp.
I am investigating build a conda
package for jwt-cpp
, and I don't want to end up with a package that bundles picojson.h
, which is what happens when I don't use the -DEXTERNAL_PICOJSON
option.
Is there a way to build jwt-cpp
without bundling picojson
that doesn't require that option?
from jwt-cpp.
For the record, I understand (and agree) that picojson
is responsible for providing the Findpicojson.cmake
file that is required, but the out-of-the-box build for that project doesn't do that.
from jwt-cpp.
I have never used conda before, but does it normally include and build test cases ?
If not just exclude the picojson file and package only the jwt include directory.
from jwt-cpp.
@Thalhammer, conda (conda-build specifically in this case) is very similar to rpmbuild in how it works: you just specify a shell script that does the build and install and it executes it. It produces a tarball of pre-compiled files that users can install as a dependency of their project. Since jwt-cpp
is just a header file, I presumed that cmake --target install
would just install that one header file.
When I execute make install
from the cmake build I get the following files installed into the prefix:
jwt-cpp/jwt-cpp-config.cmake
jwt-cpp/jwt-cpp-config-version.cmake
jwt-cpp/jwt-cpp.cmake
include/jwt-cpp/base.h
include/picojson/picojson.h
include/jwt-cpp/jwt.h
Why is picojson.h
being installed, and how can I stop cmake installing it (short of patching)?
from jwt-cpp.
You cant, at the moment. However I would happyly accept a pullrequest that adds this feature.
If you want to add it note it here, otherwise I'll add it some time down this week once I come around to do so.
from jwt-cpp.
Since picojson.h
isn't needed to actually build anything (since nothing in jwt-cpp
is compiled) I don't see why a this package should require picojson to provide a cmake configuration. Can EXTERNAL_PICOJSON
be used to just trust that the user has an external copy of picojson
on their system (i.e. not execute find_package
)?
from jwt-cpp.
@prince-chrismc What do you think ?
I have to admit that I dont really use the cmake feature, so I think your opinion might be better here.
from jwt-cpp.
Since picojson.h isn't needed to actually build anything (since nothing in jwt-cpp is compiled
currently jwt-cpp has a very hard requirement on picojson, you can not use this library without providing picojson. It will not compile downstream by anything that requires this project. It needs to be made available to jwt-cpp.
I am investigating build a
conda
package forjwt-cpp
conda support dependencies, so if you want to make a conda-build for jwt-cpp ( and do not want to bundle picojson; which would be the "right" way ) than you must provide a conda package for picojson as well. Again, hard requirement.
For the record, I understand (and agree) that
picojson
is responsible for providing theFindpicojson.cmake
file that is required, but the out-of-the-box build for that project doesn't do that.
I would strongly encourage you to make a contribution to the picojson repository with that contribution ❤️ I personally looked into it but haven't the time to make it. I would be greatly appreciated!
Can
EXTERNAL_PICOJSON
be used to just trust that the user has an external copy ofpicojson
on their system (i.e. not executefind_package
)?
The reason it's an "external dependencies" is because some external method needs to be used to provide that library, CMake native method is find_package()
which is why that method is used here.
And yes! you can tell cmake where to search. you may want to read this as it provides all the details... you pass the extra flags at configuration
If you contribute a conda build I would expect that it requires/consumes/depends on a picojson conda build as well.
Or perhaps there's a simpler solution, namely that 'binary' package builders (conda, rpm, debian) should ignore the cmake configuration and use just
install -d ${PREFIX}/include/jwt-cpp install -p include/jwt-cpp/*.h ${PREFIX}/incude/jwt-cpp/or something like that.
If you do this, conda needs to know where picojson is as well. as to come full circle it's a hard requirement
from jwt-cpp.
I understand all of the above, and yes, my plan is to create a conda package for jwt-cpp
that depends upon a package for picojson
. I will move forward with my trivial install
commands for now, since I don't have the cycles right now to figure out the syntax for a cmake config file for picojson.
Thanks for the assistance.
from jwt-cpp.
@duncanmmacleod This should allow you to disable the install of picojson by setting the cmake option NO_INSTALL_PICOJSON to TRUE.
from jwt-cpp.
Related Issues (20)
- x86/Win32 compilation and using boost json HOT 2
- Private Key Signing vs Signing from Service Account file HOT 5
- undefined reference error in compiling HOT 9
- what secret format should i use for HS512 algorithm HOT 1
- Release status of 0.7.0-rc.0 HOT 3
- Guide to Setting Up jwt-cpp? HOT 4
- Building example: no matching function for call to ‘decode(std::string&)’ HOT 1
- Compilation error: no matching function for call to ‘decode(std::string&)’ HOT 2
- Build Errors For picojson.h? HOT 8
- Getting Error - namespace "jwt" has no member "claims" HOT 6
- Unable to generate token using ed25519 HOT 2
- Use of Builder explicitly
- Need help : How to Implement JWT Operations from Python Using jwt-cpp ? HOT 5
- How to use payload and get the payload data HOT 7
- Boost JSON traits kind of buggy HOT 5
- How to verify a jwt HOT 3
- Invalid input: not within alphabet HOT 6
- Locking in libcrypto in multi threaded app HOT 6
- Linker error for OpenSSL on Windows HOT 5
- Exception is thrown with the exmple private-claims.cpp HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwt-cpp.