From f3726ee99488695c4aae22fffd3649499b285faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 6 Feb 2020 21:51:36 +0100 Subject: Use modules_enabled.gen.h to improve inter dependency checks - Fix build with gdscript module disabled. Fixes #31011. - Remove unused `gdscript` compile option. - Fix build with regex module disabled. - Fix ImageLoaderSVG to forward declare thirdparty structs. --- modules/svg/SCsub | 4 ---- modules/svg/image_loader_svg.cpp | 5 ++--- modules/svg/image_loader_svg.h | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'modules/svg') diff --git a/modules/svg/SCsub b/modules/svg/SCsub index 9324c1634b..7961d1f33e 100644 --- a/modules/svg/SCsub +++ b/modules/svg/SCsub @@ -13,10 +13,6 @@ thirdparty_sources = [ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] env_svg.Prepend(CPPPATH=[thirdparty_dir]) -# FIXME: Needed in editor/editor_themes.cpp for now, but ideally there -# shouldn't be a dependency on modules/ and its own 3rd party deps. -env.Prepend(CPPPATH=[thirdparty_dir]) -env.Append(CPPDEFINES=["SVG_ENABLED"]) env_thirdparty = env_svg.Clone() env_thirdparty.disable_warnings() diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index 11ae2f81bf..7f91908a33 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -30,9 +30,8 @@ #include "image_loader_svg.h" -#include "core/os/os.h" -#include "core/print_string.h" -#include "core/ustring.h" +#include +#include void SVGRasterizer::rasterize(NSVGimage *p_image, float p_tx, float p_ty, float p_scale, unsigned char *p_dst, int p_w, int p_h, int p_stride) { nsvgRasterize(rasterizer, p_image, p_tx, p_ty, p_scale, p_dst, p_w, p_h, p_stride); diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h index 9e9366e91b..24cee82480 100644 --- a/modules/svg/image_loader_svg.h +++ b/modules/svg/image_loader_svg.h @@ -34,13 +34,14 @@ #include "core/io/image_loader.h" #include "core/ustring.h" -#include -#include - /** @author Daniel Ramirez */ +// Forward declare and include thirdparty headers in .cpp. +struct NSVGrasterizer; +struct NSVGimage; + class SVGRasterizer { NSVGrasterizer *rasterizer; -- cgit v1.2.3