- Notifications
You must be signed in to change notification settings - Fork209
cpp-redis: allow build as shared library#86
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lindblandro left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unnecessary if-else construct.
| ### | ||
| # executable | ||
| ### | ||
| if (BUILD_SHARED_LIBS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is already a global CMake option that overrides the default behavior ofadd_library() if present.
set(BUILD_SHARED_LIBS ON)add_library(${PROJECT} ${SOURCES})will build a shared library. TheSOVERSION property will need to be added for symlinks to be generated at install time, but the properties can be set even ifBUILD_SHARED_LIBS is not set. A valid value forSOVERSION might be the same asVERSION or justPROJECT_VERSION_MAJOR
Seehttps://cmake.org/cmake/help/v3.13/variable/BUILD_SHARED_LIBS.html
It would be very helpful if we could build this library as a shared library (*.so).