-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Static/shared #263
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
Static/shared #263
Conversation
Currently JSONCPP_LIB_BUILD_SHARED variable is used as option to build static/shared libraries. The current patch uses standard CMake variables for this. Such a workaround is done in open-source-parsers#51 Current patch will make it generic.
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS Replace JSONCPP_LIB_BUILD_STATIC => BUILD_STATIC_LIBS Removed workaround open-source-parsers#51 Removed OPTION for shared/static in this file.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS Moved definition DJSON_DLL to line 11.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS Moved flag JSON_DLL to line no 8.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS Replaced JSONCPP_LIB_BUILD_STATIC => BUILD_STATIC_LIBS
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Let's discuss this now. What was broken? What's the goal of this change? |
The goal of these changes is to use standard CMake variable as option for building either shared/static library. Currently it is using JSONCPP_LIB_BUILD_SHARED & JSONCPP_LIB_BUILD_STATIC. |
According to a comment elsewhere, using the non-standard variables means that this library does not work well as a subproject. Is that your point? I tried to learn why the custom variables were chosen. It seems to have been arbitrary, in the original (eafd702) commit for cmake build-config. I think AppVeyor failed a build only because of a problem contacting GitHub. That's fine. |
Use standard **cmake** variables, to support superprojects better. - `JSONCPP_LIB_BUILD_SHARED` -> `BUILD_SHARED_LIBS` - `JSONCPP_LIB_BUILD_STATIC` -> `BUILD_STATIC_LIBS`
Actually my motivation is one of the patch i saw - #51 |
I have one more question regarding flag "JSON_DLL_BUILD". |
Yes. But it's mingled with the CPPTL code, which I cannot test. I am hoping not to break that since @blep (the original author) still uses it. It's a minor issue. Thanks for fixing these variables names. |
In Readme file, i can see below: |
(created from several separate branches by @ya1gaurav)
Let's see if it builds....