obsproject/obs-plugintemplate

Wrong CMake minimum required version.

ipatix opened this issue · 1 comments

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

30.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

example.org

OBS Studio Crash Log URL

No response

Expected Behavior

Build-Windows.ps1 runs successfully when installed CMake version is older than 3.24.

Current Behavior

Build-Windows.ps1 raises an error when installed CMake version is older than 3.24.

Steps to Reproduce

  1. Install CMake 3.23
  2. Run .github/scripts/Build-Windows-ps1 -Configuration Release -Target x64

Anything else we should know?

The error is caused because CMake versions older than 3.24, which do not support --fresh.
It is raised here:

It would be less confusing if the minimum required version is raised to 3.24 here:

cmake_minimum_required(VERSION 3.16...3.26)

An alternative is obviously to remove the usage of --fresh.

We cannot increase the minimum required version to anything above 3.22 because at the low end we still support Ubuntu 22.04 which can only provide CMake 3.22.

But we can add a version guard before adding the --fresh argument to the OBS sub-project build.