Skip to content

Conversation

@Trouffman
Copy link
Contributor

Description

Follow OBS's Master branch : https://github.com/obsproject/obs-studio/blob/master/cmake/macos/compilerconfig.cmake
Fix errors when macOS SDK is not detected when using cmake 4.0.0+

Motivation and Context

Developer using cmake 4.0.0 cannot compile plugins and get an error that the macos Version is too low.
The previous SDK detection process return an empty value for the version of the SDK

How Has This Been Tested?

Confirmed it solved the problem as part of the developement of the DistroAV plugin

Types of changes

Bug fixs for user on MacOS and Cmake 4.0.0+

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.

Change in-line with OBS's Master branch : https://github.com/obsproject/obs-studio/blob/master/cmake/macos/compilerconfig.cmake

Fix errors when macOS SDK is not detected when using cmake 4.0.0+
@paulpv
Copy link
Contributor

paulpv commented Apr 2, 2025

Constructive feedback @Trouffman

Without more context/background/detauls, this might look like a PR that OBS Team would be hesitant to accept.

Indeed this code change comes straight from OBS master and was authored by jcm93 and committed by @RytoEX

It might help this PR to get approved by citing the precise OBS commit/PR that this PR is pulling in:

@RytoEX
Copy link
Member

RytoEX commented Apr 30, 2025

This is failing on CI for this PR. obs_macos_current_sdk seems to be empty. Why? Or is CI not actually building this PR? @PatTheMav ?

@glikely
Copy link
Contributor

glikely commented May 1, 2025

It's failing because CMake 4.0 broke both obs-studio and obs-plugintemplate. This PR fixes the obs-plugintemplate breakage, but the overall build will continue failing until the same fix lands in a tagged obs-studio release and this template gets updated to use it.

This is why I asked for the fix to be backported into the 31.0.x branch: obsproject/obs-studio#12076 (comment)

@RytoEX
Copy link
Member

RytoEX commented May 1, 2025

It's failing because CMake 4.0 broke both obs-studio and obs-plugintemplate. This PR fixes the obs-plugintemplate breakage, but the overall build will continue failing until the same fix lands in a tagged obs-studio release and this template gets updated to use it.

This is why I asked for the fix to be backported into the 31.0.x branch: obsproject/obs-studio#12076 (comment)

Yeah, I realized that late last night. We'll have to live with the CI failure for a bit then, but this change is fine.

@RytoEX RytoEX merged commit 2c55096 into obsproject:master May 1, 2025
10 of 12 checks passed
@glikely
Copy link
Contributor

glikely commented May 5, 2025

Even if you’re not releasing, could you add a tag to the 31.0.x branch with the fix? That would be enough to get this repo building again by pointing it at the fixed tag

@RytoEX
Copy link
Member

RytoEX commented May 5, 2025

Even if you’re not releasing, could you add a tag to the 31.0.x branch with the fix? That would be enough to get this repo building again by pointing it at the fixed tag

I would only push a tag if I was going to make a release on that branch.

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.

5 participants