-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Please use standard CMake variable to configure static vs. shared builds #51
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
Comments
Maybe that was for backward compatibility with |
See #93. |
ya1gaurav
added a commit
to ya1gaurav/jsoncpp
that referenced
this issue
Apr 23, 2015
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.
ya1gaurav
added a commit
to ya1gaurav/jsoncpp
that referenced
this issue
Apr 23, 2015
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.
This was referenced Apr 23, 2015
cdunn2001
pushed a commit
to cdunn2001/jsoncpp
that referenced
this issue
Apr 23, 2015
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.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When building jsoncpp as part of a "superbuild" of a larger project, I was surprised that it build a static library. I see this is because shared vs. static is configured by the
JSONCPP_LIB_BUILD_SHARED
option and not the standard CMake optionBUILD_SHARED_LIBS
.Is there a reason you cannot use the latter? Please do so if possible, or at least default
JSONCPP_LIB_BUILD_SHARED
to${BUILD_SHARED_LIBS}
rather thanOFF
.The text was updated successfully, but these errors were encountered: