mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 03:48:03 +02:00
boilerplate: Cleanup conditional compilation ofcairo-quartz-boilerplate.c
It's much nicer to use automake to conditionally compile a file, instead of always compiling it and conditionally having the compiler see an empty file.
This commit is contained in:
parent
cea107c980
commit
fcf49a5613
4 changed files with 12 additions and 13 deletions
|
|
@ -2,12 +2,16 @@ EXTRA_LTLIBRARIES = libcairoboilerplate.la
|
|||
|
||||
libcairoboilerplate_la_SOURCES =\
|
||||
cairo-boilerplate.c \
|
||||
cairo-quartz-boilerplate.c \
|
||||
cairo-boilerplate.h \
|
||||
xmalloc.c \
|
||||
xmalloc.h
|
||||
libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la $(CAIRO_LDADD)
|
||||
|
||||
if CAIRO_HAS_QUARTZ_SURFACE
|
||||
libcairoboilerplate_la_SOURCES += cairo-quartz-boilerplate.c
|
||||
libcairoboilerplate_la_SOURCES += cairo-quartz-boilerplate-private.h
|
||||
endif
|
||||
|
||||
if CAIRO_HAS_BEOS_SURFACE
|
||||
libcairoboilerplate_la_SOURCES += cairo-test-beos.cpp cairo-test-beos.h
|
||||
# BeOS system headers trigger this warning
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@
|
|||
*/
|
||||
|
||||
#include "cairo-boilerplate.h"
|
||||
#include "cairo-boilerplate-private.h"
|
||||
|
||||
#if CAIRO_HAS_QUARTZ_SURFACE
|
||||
#include "cairo-quartz-boilerplate-private.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -24,10 +24,8 @@
|
|||
* Author: Carl D. Worth <cworth@cworth.org>
|
||||
*/
|
||||
|
||||
#ifndef _CAIRO_BOILERPLATE_PRIVATE_H_
|
||||
#define _CAIRO_BOILERPLATE_PRIVATE_H_
|
||||
|
||||
#if CAIRO_HAS_QUARTZ_SURFACE
|
||||
#ifndef _CAIRO_QUARTZ_BOILERPLATE_PRIVATE_H_
|
||||
#define _CAIRO_QUARTZ_BOILERPLATE_PRIVATE_H_
|
||||
|
||||
cairo_surface_t *
|
||||
_cairo_quartz_boilerplate_create_surface (const char *name,
|
||||
|
|
@ -40,6 +38,4 @@ _cairo_quartz_boilerplate_create_surface (const char *name,
|
|||
void
|
||||
_cairo_quartz_boilerplate_cleanup (void *closure);
|
||||
|
||||
#endif /* CAIRO_HAS_QUARTZ_SURFACE */
|
||||
|
||||
#endif
|
||||
|
|
@ -25,9 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "cairo-boilerplate.h"
|
||||
#include "cairo-boilerplate-private.h"
|
||||
|
||||
#if CAIRO_HAS_QUARTZ_SURFACE
|
||||
#include "cairo-quartz-boilerplate-private.h"
|
||||
|
||||
#include <cairo-quartz.h>
|
||||
|
||||
|
|
@ -60,5 +58,3 @@ _cairo_quartz_boilerplate_cleanup (void *closure)
|
|||
{
|
||||
/* nothing */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue