Fix test compilation when font-config is disabled

Submitted by Alexandre Bique on May 18, 2018, 9:39 a.m.

Details

Message ID CAP737oKxMNdttOghABA8etGvFqW8ug5tJR7iAyykThVCwr6kdw@mail.gmail.com
State New
Headers show
Series "Fix test compilation when font-config is disabled" ( rev: 1 ) in Cairo

Not browsing as part of any series.

Commit Message

Alexandre Bique May 18, 2018, 9:39 a.m.
Hi,

Building cairo without font-config fails because test/font-variations.c
does not build.

Here is the fix.

Regards,
Alex.

Patch hide | download patch | download mbox

--- test/font-variations.c 2018-05-18 11:24:02.727369293 +0200
+++ test/font-variations.c 2018-05-18 11:32:53.597510618 +0200
@@ -27,14 +27,17 @@ 

 #include <assert.h>

-#if CAIRO_HAS_FC_FONT
+// This test requires freetype2
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_MULTIPLE_MASTERS_H
+
+#if CAIRO_HAS_FC_FONT
 #include <fontconfig/fontconfig.h>
-#include "cairo-ft.h"
 #endif

+#include "cairo-ft.h"
+
 #define FloatToFixed(f) ((FT_Fixed)((f)*65536))

 static cairo_test_status_t

Comments

On Fri, May 18, 2018 at 11:39:33AM +0200, Alexandre Bique wrote:
> Hi,
> 
> Building cairo without font-config fails because test/font-variations.c
> does not build.
> 
> Here is the fix.
> 
> Regards,
> Alex.

Note Cairo uses C-style comments rather than C++, but I fixed that
locally.  Thanks for the patch, applied:

To ssh://git.freedesktop.org/git/cairo
   c6e12d3..ccdb8e2  master -> master

 
> --- test/font-variations.c 2018-05-18 11:24:02.727369293 +0200
> +++ test/font-variations.c 2018-05-18 11:32:53.597510618 +0200
> @@ -27,14 +27,17 @@
> 
>  #include <assert.h>
> 
> -#if CAIRO_HAS_FC_FONT
> +// This test requires freetype2
>  #include <ft2build.h>
>  #include FT_FREETYPE_H
>  #include FT_MULTIPLE_MASTERS_H
> +
> +#if CAIRO_HAS_FC_FONT
>  #include <fontconfig/fontconfig.h>
> -#include "cairo-ft.h"
>  #endif
> 
> +#include "cairo-ft.h"
> +
>  #define FloatToFixed(f) ((FT_Fixed)((f)*65536))
> 
>  static cairo_test_status_t
> 
> 
> -- 
> Alexandre Bique

> -- 
> cairo mailing list
> cairo@cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo