mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
c586c1d06f
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.
11 lines
369 B
CMake
11 lines
369 B
CMake
if(TWITCH_CLIENTID
|
|
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)
|
|
else()
|
|
target_disable_feature(obs-studio "Twitch API connection")
|
|
set(TWITCH_CLIENTID "")
|
|
set(TWITCH_HASH "0")
|
|
endif()
|