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: Update MbedTLS finder to support MSVC Debug configuration #10081

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

PatTheMav
Copy link
Member

Description

Remove DEFAULTLIB directive of MbedTLS for Debug builds on Windows.

Motivation and Context

Natively compiled MbedTLS for Windows will use the non-debug platform library, which will lead to a linker error when building OBS in debug configuration with MSVC.

Neutralizing the linker directive for Debug builds on Windows unbreaks the build configuration without the need to ship separate debug variants of MbedTLS.

How Has This Been Tested?

Tested on Windows 11 with natively compiled MbedTLS static libraries.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Natively compiled MbedTLS for Windows will use the non-debug platform
library, which will lead to a linker error when building OBS in debug
configuration with MSVC.

Neutralizing the linker directive for Debug builds on Windows
unbreaks the build configuration without the need to ship separate
debug variants of MbedTLS.
@PatTheMav PatTheMav added Bug Fix Non-breaking change which fixes an issue Windows Affects Windows labels Jan 5, 2024
@RytoEX RytoEX self-assigned this Jan 6, 2024
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that this fixes building in Debug against obsproject/obs-deps#186. RelWithDebInfo also works.

Can still build in Debug and RelWithDebInfo with current deps.

@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone Jan 8, 2024
@RytoEX RytoEX merged commit e79b190 into obsproject:master Jan 8, 2024
14 checks passed
@PatTheMav PatTheMav deleted the mbedtls-debug-fix branch January 9, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue Windows Affects Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants