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.
This commit is contained in:
Rémi Verschelde
2020-02-06 21:51:36 +01:00
parent b7297fb39c
commit f3726ee994
14 changed files with 55 additions and 29 deletions

View File

@ -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()

View File

@ -30,9 +30,8 @@
#include "image_loader_svg.h"
#include "core/os/os.h"
#include "core/print_string.h"
#include "core/ustring.h"
#include <nanosvg.h>
#include <nanosvgrast.h>
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);

View File

@ -34,13 +34,14 @@
#include "core/io/image_loader.h"
#include "core/ustring.h"
#include <nanosvg.h>
#include <nanosvgrast.h>
/**
@author Daniel Ramirez <djrmuv@gmail.com>
*/
// Forward declare and include thirdparty headers in .cpp.
struct NSVGrasterizer;
struct NSVGimage;
class SVGRasterizer {
NSVGrasterizer *rasterizer;