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

Add USE_STATIC_MSVC_RUNTIME cmake option instead of always using statically-linked runtime library #805

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

OpenSauce04
Copy link
Contributor

@OpenSauce04 OpenSauce04 commented Nov 19, 2024

This pull request corrects for an issue introduced in 877364f which caused anything dynamically linking against cubeb to fail to compile via MSVC due to a mismatched RuntimeLibrary value. There was no clean way to fix this issue in the dependent project due to there being no cmake configuration option to prevent this value from being set.

The pull request fixes this by adding a new USE_STATIC_MSVC_RUNTIME option which, when enabled, sets CMAKE_MSVC_RUNTIME_LIBRARY to MultiThreaded$<$<CONFIG:Debug>:Debug>.
If the option is not set, CMAKE_MSVC_RUNTIME_LIBRARY will be left at its default value, which as per the cmake documentation is MultiThreaded$<$<CONFIG:Debug>:Debug>DLL.

@OpenSauce04 OpenSauce04 force-pushed the cmake-static-msvc-option branch from afd4448 to d6a407d Compare November 19, 2024 17:22
@padenot padenot merged commit d504c22 into mozilla:master Nov 20, 2024
15 checks passed
@padenot
Copy link
Collaborator

padenot commented Nov 20, 2024

Thanks for the patch!

@OpenSauce04 OpenSauce04 deleted the cmake-static-msvc-option branch November 21, 2024 08:09
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