Skip to content

cmake: Add obs_modules to MacOS build dependencies#12382

Closed
Trouffman wants to merge 1 commit into
obsproject:masterfrom
DistroAV:fix-31.1.1-cmake
Closed

cmake: Add obs_modules to MacOS build dependencies#12382
Trouffman wants to merge 1 commit into
obsproject:masterfrom
DistroAV:fix-31.1.1-cmake

Conversation

@Trouffman

Copy link
Copy Markdown

Description

This fix an error when building a plugin using OBS 31.1.1 as base. (in plugin's buildspec.json)

This change add the variable obs_modules to the dependencies for building on macos.
It also makes it consistent with how Windows & linux are built. (could have been missed)

Motivation and Context

Solves Issue : #12381
Align all 3 OS on the same behaviour / build requirement (at least for that part)
Allow to build plugin based on OBS 31.1 (and start adding support/test for WoA support too)

How Has This Been Tested?

  • Tested on DistroAV plugin locally and on github actions.
    Result of the github action on the DistroAV project (using this fix + obs-deps from 2025-07-11)

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.

@WizardCM WizardCM added kind/bug Categorizes issue or PR as related to a bug. area/ci labels Jul 13, 2025
@PatTheMav

Copy link
Copy Markdown
Member

The dependencies (including modules) are already added via

      get_property(obs_dependencies GLOBAL PROPERTY _OBS_DEPENDENCIES)
      add_dependencies(${target} ${obs_dependencies})

so adding them again via obs_modules is unnecessary. The reason there is a separate property for it is that macOS ships additional binary modules that other platforms don't have.

The actual issue here is not the add_dependencies call, but that somehow ENABLE_UI=OFF is not properly taking effect.

Compare:

OBS Studio 30.0.4:

                      _                   _             _ _       
                 ___ | |__  ___       ___| |_ _   _  __| (_) ___  
                / _ \| '_ \/ __|_____/ __| __| | | |/ _` | |/ _ \ 
               | (_) | |_) \__ \_____\__ \ |_| |_| | (_| | | (_) |
                \___/|_.__/|___/     |___/\__|\__,_|\__,_|_|\___/ 

OBS:  Application Version: 31.0.4 - Build Number: 1
==================================================================================


------------------------       Enabled Features           ------------------------
 - OpenGL renderer
------------------------       Disabled Features          ------------------------
 - Plugin Support
 - User Interface
----------------------------------------------------------------------------------
-- Configuring done (23.4s)
-- Generating done (0.0s)

OBS Studio 30.1.1:

                      _                   _             _ _       
                 ___ | |__  ___       ___| |_ _   _  __| (_) ___  
                / _ \| '_ \/ __|_____/ __| __| | | |/ _` | |/ _ \ 
               | (_) | |_) \__ \_____\__ \ |_| |_| | (_| | | (_) |
                \___/|_.__/|___/     |___/\__|\__,_|\__,_|_|\___/ 

OBS:  Application Version: 31.1.1 - Build Number: 6
==================================================================================


------------------------       Enabled Features           ------------------------
 - OpenGL renderer
 - Scripting Support (Frontend)
 - Scripting support
 - User Interface
------------------------       Disabled Features          ------------------------
 - Plugin Support
 - Restream API connection
 - Sparkle updater
 - Twitch API connection
 - YouTube API connection
 - macOS CMIO Camera Extension
----------------------------------------------------------------------------------
-- Configuring done (0.9s)
-- Generating done (0.4s)

The frontend project is not skipped and that's the root cause.

@PatTheMav

Copy link
Copy Markdown
Member

@Trouffman The required fix is to change the plugin template and use ENABLE_FRONTEND=OFF instead of ENABLE_UI=OFF. Feel free to bake this into the other changes of your most recent PR over there, so we can all fix that in one PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants