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

cmake: Add BULLET_BUILD_SHARED_LIBS to replace BUILD_SHARED_LIBS #4536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ryp
Copy link

@Ryp Ryp commented Oct 23, 2023

When building with MSVC, bullet doesn't support using shared libs.

Projects might choose to build bullet as part of their CMake pipeline, and there's currently no good way to override BUILD_SHARED_LIBS to static just for bullet, and still support shared library outside of bullet.

This change adds an intermediate BULLET_BUILD_SHARED_LIBS that caches the initial value of BUILD_SHARED_LIBS, but can be freely overriden by parent projects. In my case, I want to be able to force bullet to static on windows, since the original developer didn't support this use case.

All calls to add_library() now have an explicit BULLET_BUILD_TYPE to this purpose. Previous call to add_library() that already were overriding the default build type were left alone. This should be enough to support all current use cases and add the ability for parent projects to force bullet to static.

When building with MSVC, bullet doesn't support using shared libs.

Projects might choose to build bullet as part of their CMake pipeline,
and there's currently no good way to override BUILD_SHARED_LIBS to
static just for bullet, and still support shared library outside of
bullet.

This change adds an intermediate BULLET_BUILD_SHARED_LIBS that caches the
initial value of BUILD_SHARED_LIBS, but can be freely overriden by
parent projects. In my case, I want to be able to force bullet to static
on windows, since the original developer didn't support this use case.

All calls to add_library() now have an explicit BULLET_BUILD_TYPE to
this purpose. Previous call to add_library() that already were
overriding the default build type were left alone. This should be enough
to support all current use cases and add the ability for parent projects
to force bullet to static.
@Ryp
Copy link
Author

Ryp commented Oct 23, 2023

@Ryp
Copy link
Author

Ryp commented Sep 4, 2024

Gentle ping to have any feedback please

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.

1 participant