obsproject / obs-plugintemplate

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

cmake: Use C17 only with CMake 3.21 or above #89

Closed umireon closed 1 year ago

umireon commented 1 year ago

Description

C17 is not supported until CMake 3.21 and C17 must be used with CMake 3.21 or above. https://cmake.org/cmake/help/latest/prop_tgt/C_STANDARD.html

Motivation and Context

CMake 3.20 is provided on openSUSE Leap 15.5 and the plugin building with CMake commands fails with the message that CMake does not understand the C standard of C17. I need this bug to be fixed to build on openSUSE Leap.

How Has This Been Tested?

This change is tested in our plugin. https://github.com/royshil/obs-backgroundremoval/pull/430

The building log of our plugin with this change is available: https://pmbs.links2linux.org/package/live_build_log/home:umireon/obs-backgroundremoval/15.5/x86_64

Types of changes

Checklist:

umireon commented 1 year ago

@RytoEX I've fixed the commit message.

PatTheMav commented 1 year ago

Should be fine, we expect more recent versions on Windows and macOS anyway.