Fix dependencies and cmake configuration

This commit is contained in:
Vyn 2025-06-24 17:23:36 +02:00
parent 810607c01f
commit f7fce6cf5a
Signed by: vyn
GPG key ID: E1B2BE34E7A971E7
3 changed files with 7 additions and 6 deletions

View file

@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.21)
project(selenite LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
add_subdirectory(external/rei-json)
@ -15,4 +12,8 @@ add_library(selenite
target_link_libraries(selenite PRIVATE rei-json)
target_include_directories(selenite PRIVATE "include")
add_subdirectory(external/rei-json)
target_include_directories(selenite PRIVATE "external/rei-json/include")
target_link_libraries(selenite PRIVATE rei-json)

@ -1 +1 @@
Subproject commit 2041a0aafe85085dcf35a37437db493898f1be3c
Subproject commit 63e7986b0901449657c3874ed7b19618315e9f01

View file

@ -30,9 +30,9 @@ std::optional<Palette> parseJson(const std::string &path)
std::stringstream buffer;
buffer << file.rdbuf();
auto jsonStr = buffer.str();
auto jsonOpt = rei::json::parse(jsonStr);
auto json = std::get<rei::json::JsonObject>(jsonOpt);
auto json = jsonOpt.asObject();
/*if (!json.is_object() || !json["primary"].is_string() || !json["secondary"].is_string() ||*/
/*!json["background"].is_string() || !json["background2"].is_string() ||*/