From c606914164af2dd596c3ccf17d695723e3e42e45 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:55:05 +0200 Subject: Fix building with -DOPTION_USE_SVG=Off --- fluid/Fluid_Image.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 92f4322ca..dd24bd2d2 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -199,7 +199,9 @@ void Fluid_Image::write_static(Fd_Code_Writer& f, int compressed) { size_t nData = write_static_binary(f, "PNG"); f.write_c(";\n"); write_initializer(f, "Fl_PNG_Image", "\"%s\", %s, %d", fl_filename_name(name()), idata_name, nData); - } else if (fl_ascii_strcasecmp(fl_filename_ext(name()), ".svg")==0 || fl_ascii_strcasecmp(fl_filename_ext(name()), ".svgz")==0) { + } +#ifdef FLTK_USE_SVG + else if (fl_ascii_strcasecmp(fl_filename_ext(name()), ".svg")==0 || fl_ascii_strcasecmp(fl_filename_ext(name()), ".svgz")==0) { bool gzipped = (strcmp(fl_filename_ext(name()), ".svgz") == 0); // Write svg image data... if (compressed) { @@ -232,7 +234,9 @@ void Fluid_Image::write_static(Fd_Code_Writer& f, int compressed) { write_file_error(f, "RGB_from_SVG"); } } - } else { + } +#endif // FLTK_USE_SVG + else { write_static_rgb(f, idata_name); } } -- cgit v1.2.3