obsproject / obs-plugintemplate

GNU General Public License v2.0
285 stars 133 forks source link

`CMakePresets.json` should have a single definition for `ENABLE_FRONTEND_API` and `ENABLE_QT` #103

Closed Susko3 closed 8 months ago

Susko3 commented 9 months ago

Operating System Info

Windows 11

Expected Behavior

I should be able to change the values of ENABLE_FRONTEND_API and ENABLE_QT in one place and have them apply to all operating systems.

Current Behavior

I have to change ENABLE_FRONTEND_API and/or ENABLE_QT on each OS I support.

Steps to Reproduce

  1. Use this template
  2. In your plugin, make us of QT or the OBS frontend api
    • this requires setting the appropriate build variables, so you:
  3. Open CMakePresets.json and quickly realise you need to set the same value multiple times, leading to possible user-errors

Anything else we should know?

Using inheritance and a single preset for the two cross-platform variables makes sense as a solution.

PatTheMav commented 9 months ago

As you already mentioned the appropriate fix for the issue (create a hidden "template" preset with global values), would you be willing to open a PR to fix this accordingly?

Susko3 commented 8 months ago

I'm not too familiar with cmake presets, and there are currently a bunch of configurations for different operating systems. So I don't feel confident about changing things.

I was hoping someone with more experience would pick up my idea.