cmake: Require nlohmann-json when building the front-end

Nlohmann-json is used in the about dialog, yet wasn't required when building the front-end, leading to failing compilation. This ensures that it is correctly required.
This commit is contained in:
Romain Vigier 2022-09-05 09:21:17 +02:00 committed by Michael Fabian 'Xaymar' Dirks
parent bfd8155ddc
commit 3d293bac6a

View file

@ -1,4 +1,5 @@
# Copyright (C) 2017 Michael Fabian Dirks # Copyright (C) 2017 Michael Fabian Dirks
# Copyright (C) 2022 Romain Vigier
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -653,10 +654,14 @@ function(feature_frontend RESOLVE)
elseif(NOT obs-frontend-api_FOUND) elseif(NOT obs-frontend-api_FOUND)
message(WARNING "${LOGPREFIX}Front-End requires OBS FrontEnd API. Disabling...") message(WARNING "${LOGPREFIX}Front-End requires OBS FrontEnd API. Disabling...")
set_feature_disabled(FRONTEND ON) set_feature_disabled(FRONTEND ON)
elseif(NOT HAVE_JSON)
message(WARNING "${LOGPREFIX}Front-End requires nlohmann::json. Disabling...")
set_feature_disabled(FRONTEND ON)
endif() endif()
elseif(T_CHECK) elseif(T_CHECK)
set(REQUIRE_QT ON PARENT_SCOPE) set(REQUIRE_QT ON PARENT_SCOPE)
set(REQUIRE_OBS_FRONTEND_API ON PARENT_SCOPE) set(REQUIRE_OBS_FRONTEND_API ON PARENT_SCOPE)
set(REQUIRE_JSON ON PARENT_SCOPE)
endif() endif()
endfunction() endfunction()