libobs-metal: Explicitly enable Swift language support if ENABLE_PLUGINS is OFF #12691
+3
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes a mistake in the libobs-metal CMake file that was likely missed due to unexpected CMake behavior. When ENABLE_PLUGINS is set to OFF we don't actually ever enable Swift support and CMake delays the error for this until after the configure stage. This behavior is hidden by mac-virtualcam which does call the proper functions.
Motivation and Context
When ENABLE_PLUGINS (since 32.0.0) is set to OFF strange CMake errors are reported and the build fails. These patches fix the mistake in the CMake code and allowed us to keep libobs as a dependency.
How Has This Been Tested?
We've been able to successfully build libOBS with ENABLE_PLUGINS=OFF locally and on Github Actions with these patches applied.
Types of changes
Checklist:
I did not check any of the ones that don't apply here.