Skip to content
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

Fix dependencies when building core as shared libs #759

Merged
merged 2 commits into from
Jun 7, 2019

Conversation

JonasVautherin
Copy link
Collaborator

When building the core as shared libraries, the dependencies (e.g. curl) are linked statically and therefore are not required to be linked further.

This PR fixes the build system such that those dependencies are linked using PRIVATE, meaning that they don't propagate to DronecodeSDKTargets.cmake.

Resolves #758.

@JonasVautherin JonasVautherin requested a review from julianoes June 4, 2019 22:26
@JonasVautherin JonasVautherin self-assigned this Jun 4, 2019
@JonasVautherin JonasVautherin force-pushed the 758-fix-shared-libs-build branch from bbe891e to a38b90a Compare June 4, 2019 22:58
julianoes
julianoes previously approved these changes Jun 5, 2019
@JonasVautherin
Copy link
Collaborator Author

@julianoes: So I set BUILD_SHARED_LIBS=ON by default, because it seems like it is what people want to do usually (and then install that). It also makes sense for the backend. In our case, we tend to link our libs statically against the backend, so the CI gets -DBUILD_SHARED_LIBS=OFF when -DBUILD_BACKEND=ON, but that's our choice. Does that make sense to you?

julianoes
julianoes previously approved these changes Jun 6, 2019
@julianoes
Copy link
Collaborator

set BUILD_SHARED_LIBS=ON by default

Yes I think that makes sense.

@JonasVautherin JonasVautherin force-pushed the 758-fix-shared-libs-build branch from a157b34 to 3287f83 Compare June 6, 2019 11:38
@JonasVautherin
Copy link
Collaborator Author

Always surprised to see that the coverage can decrease by 3.4% with such changes 😅

@julianoes julianoes merged commit 22fcf4b into develop Jun 7, 2019
@julianoes julianoes deleted the 758-fix-shared-libs-build branch June 7, 2019 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing dependencies when linking SDK as shared libraries
2 participants