cmake: Add support for unobfuscated OAuth secrets

Unobfuscated secrets require the hash values to be set to 0, by default
CMake will treat 0 as a falsy value. This commit adds support for
_either_ 0 _or_ a valid hexadecimal hash.
This commit is contained in:
PatTheMav 2023-06-30 14:33:05 +02:00 committed by Ryan Foster
parent 89625715fc
commit c586c1d06f
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
if(RESTREAM_CLIENTID
AND RESTREAM_HASH
AND RESTREAM_HASH MATCHES "(0|[a-fA-F0-9]+)"
AND TARGET OBS::browser-panels)
target_sources(obs-studio PRIVATE auth-restream.cpp auth-restream.hpp)
target_enable_feature(obs-studio "Restream API connection" RESTREAM_ENABLED)

View file

@ -1,5 +1,5 @@
if(TWITCH_CLIENTID
AND TWITCH_HASH
AND TWITCH_HASH MATCHES "(0|[a-fA-F0-9]+)"
AND TARGET OBS::browser-panels)
target_sources(obs-studio PRIVATE auth-twitch.cpp auth-twitch.hpp)
target_enable_feature(obs-studio "Twitch API connection" TWITCH_ENABLED)

View file

@ -1,7 +1,7 @@
if(YOUTUBE_CLIENTID
AND YOUTUBE_SECRET
AND YOUTUBE_CLIENTID_HASH
AND YOUTUBE_SECRET_HASH)
AND YOUTUBE_CLIENTID_HASH MATCHES "(0|[a-fA-F0-9]+)"
AND YOUTUBE_SECRET_HASH MATCHES "(0|[a-fA-F0-9]+)")
target_sources(obs-studio PRIVATE auth-youtube.cpp auth-youtube.hpp window-youtube-actions.cpp
window-youtube-actions.hpp youtube-api-wrappers.cpp youtube-api-wrappers.hpp)