diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 4a421d6f08e6..23e397263254 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1188,6 +1188,7 @@ define gb_LinkTarget__use_cairo $(call gb_LinkTarget_set_include,$(1),\ $$(INCLUDE) \ $(CAIRO_CFLAGS) \ + -DSYSTEM_CAIRO \ ) $(call gb_LinkTarget_use_external,$(1),freetype_headers) $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS)) diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index f72046ddda53..a0c780d755b5 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -39,7 +39,7 @@ void dl_cairo_surface_set_device_scale(cairo_surface_t* surface, double x_scale, double y_scale) { -#if !HAVE_DLAPI +#if !HAVE_DLAPI || !defined(SYSTEM_CAIRO) cairo_surface_set_device_scale(surface, x_scale, y_scale); #else static auto func = reinterpret_cast( @@ -51,7 +51,7 @@ void dl_cairo_surface_set_device_scale(cairo_surface_t* surface, double x_scale, void dl_cairo_surface_get_device_scale(cairo_surface_t* surface, double* x_scale, double* y_scale) { -#if !HAVE_DLAPI +#if !HAVE_DLAPI || !defined(SYSTEM_CAIRO) cairo_surface_get_device_scale(surface, x_scale, y_scale); #else static auto func = reinterpret_cast(