From 60b4ebfbf3be78dba9dc7c65ab2bdaa0b218c0c2 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 21 Oct 2024 19:22:50 -0400 Subject: Everything before initial synced list Signed-off-by: Andrew Opalach --- src/util/color_palette.c | 15 +++++++++++---- src/util/meson.build | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/color_palette.c b/src/util/color_palette.c index 53c2c68..3bc7f3e 100644 --- a/src/util/color_palette.c +++ b/src/util/color_palette.c @@ -1,9 +1,8 @@ -#include -#include - #include "color_palette.h" -struct camu_color_palette global_color_palette = {0}; +#ifdef AKIYO_HAS_JSON +#include +#include static char *special_colors[2] = { "background", @@ -28,9 +27,13 @@ static char *normal_colors[16] = { "color14", "color15" }; +#endif + +struct camu_color_palette global_color_palette = { 0 }; bool camu_color_palette_init(str *path) { +#ifdef AKIYO_HAS_JSON struct aki_file file; if (!aki_file_open(&file, path, 0)) { return false; @@ -59,4 +62,8 @@ bool camu_color_palette_init(str *path) global_color_palette.colors[i + 2] = (u32)al_str_to_long(al_str_w((char *)color, 1, 6), 16); } return true; +#else + (void)path; + return false; +#endif } diff --git a/src/util/meson.build b/src/util/meson.build index eff0fe6..1d62f55 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -1,6 +1,7 @@ util_src = ['color_palette.c', 'blocking_ring_buffer.c'] blake3_opts = cmake.subproject_options() -blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : 'Release' }) +reltype = is_minsize ? 'MinSizeRel' : 'Release' +blake3_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : reltype }) blake3 = cmake.subproject('BLAKE3').dependency('blake3') util_deps = [blake3] util = declare_dependency(sources: util_src, dependencies: util_deps) -- cgit v1.2.3-101-g0448