From 2ae692de2644f908dff17a8798242777c4631e4a Mon Sep 17 00:00:00 2001 From: Paulchen-Panther Date: Mon, 18 Feb 2019 21:16:30 +0100 Subject: [PATCH] Config correction enabled Change of protobuf dependency for Amlogic --- dependencies/CMakeLists.txt | 4 ++++ libsrc/hyperion/SettingsManager.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 66fcde99..67e30835 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -76,6 +76,10 @@ set(USE_SYSTEM_PROTO_LIBS ${DEFAULT_USE_SYSTEM_PROTO_LIBS} CACHE BOOL "use proto if (USE_SYSTEM_PROTO_LIBS) find_package(Protobuf REQUIRED) + if (ENABLE_AMLOGIC) + set(PROTOBUF_INCLUDE_DIRS "${Protobuf_INCLUDE_DIRS}" PARENT_SCOPE) + set(PROTOBUF_PROTOC_EXECUTABLE "${Protobuf_PROTOC_EXECUTABLE}" PARENT_SCOPE) + endif() include_directories(${PROTOBUF_INCLUDE_DIRS}) else () set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared protobuf library") diff --git a/libsrc/hyperion/SettingsManager.cpp b/libsrc/hyperion/SettingsManager.cpp index e024aa1b..08f20914 100644 --- a/libsrc/hyperion/SettingsManager.cpp +++ b/libsrc/hyperion/SettingsManager.cpp @@ -41,6 +41,7 @@ SettingsManager::SettingsManager(Hyperion* hyperion, const quint8& instance, con Info(_log, "Selected configuration file: %s", QSTRING_CSTR(configFile)); QJsonSchemaChecker schemaCheckerT; + schemaCheckerT.setSchema(schemaJson); if(!JsonUtils::readFile(configFile, _qconfig, _log)) throw std::runtime_error("Failed to load config!"); @@ -96,6 +97,7 @@ SettingsManager::SettingsManager(const quint8& instance, const QString& configFi Info(_log, "Selected configuration file: %s", QSTRING_CSTR(configFile)); QJsonSchemaChecker schemaCheckerT; + schemaCheckerT.setSchema(schemaJson); if(!JsonUtils::readFile(configFile, _qconfig, _log)) throw std::runtime_error("Failed to load config!");