-
Notifications
You must be signed in to change notification settings - Fork 199
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
Issues when including as cmake subproject #44
Comments
I think that this is a significant behavior change that would happen with this proposed change. One possible way around this could be to rename the CMake option to e.g. FRUIT_AS_STATIC_LIB or something like that. However this change might break some users that are currently passing
Maybe I should have asked earlier, but could you please explain better your use case? Why do you do that instead of downloading the latest Fruit version and compiling that once (as a static or shared library, and with any other flags you might want) and then linking against it from your project? |
Note: I'm still interested in understanding and addressing your use case, but without more information it's hard for me to suggest alternative solutions to your problem, or to be convinced that we should do the change you propose. |
Without additional information, I'm afraid there is little I can do here. |
I'm adding
fruit
project as a subdirectory in my project withadd_subdirectory(fruit EXCLUDE_FROM_ALL)
and from now on all library targets are building as shared as well.This is related to #7, and #8 especially this change in main
CMakeLists.txt
:As according to
cmake-variables(7)
this variable is global and will propagate to all library targets defined after includingfruit
. My best guess is that mentioned change was just to add some kind of compatiblity (previously the library wasSHARED
). Manual says that the typical usage of this variable is through anoption
.I'd suggest removing mentioned change, as according to
cmake-variables(7)
. If there is a need for shared library in CI you can always specify-DBUILD_SHARED_LIBS=ON
to produce.so
, but by default it would be a static one.If there isn't any side effects that I didn't think of I'll be happy to prepare a pull request.
The text was updated successfully, but these errors were encountered: