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: use BUILD_SHARED_LIBS #776

Closed
wants to merge 3 commits into from
Closed

cmake: use BUILD_SHARED_LIBS #776

wants to merge 3 commits into from

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Apr 29, 2023

Only build shared or static library (not both).

refs #771

Breaking change, for static builds cmake -B build -DBUILD_SHARED_LIBS=OFF is needed.

@sreimers sreimers marked this pull request as ready for review April 29, 2023 19:13
@alfredh
Copy link
Contributor

alfredh commented Apr 29, 2023

I can try this with Vcpkg
and see if it works.

@alfredh
Copy link
Contributor

alfredh commented Apr 30, 2023

this looks good.

I tested this patch with Vcpkg and it is working:

microsoft/vcpkg#30859

@alfredh
Copy link
Contributor

alfredh commented May 1, 2023

I guess for Debian packages we would have to compile it twice, one for shared and one for static ?

also another option is to add 2 variables, so it can build both in one go:

LIBRE_BUILD_STATIC=OFF|ON
LIBRE_BUILD_SHARED=OFF|ON

@sreimers sreimers marked this pull request as draft May 1, 2023 15:34
@sreimers
Copy link
Member Author

sreimers commented May 1, 2023

Yes I think this looks better and is more flexible: #778

@sreimers sreimers closed this May 1, 2023
@sreimers sreimers deleted the cmake_shared branch October 4, 2023 11:25
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.

2 participants