mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-04 22:20:28 +01:00
[perf] Fix SDL compilation for MacOS X
The attached patch makes the SDL tests compile under Mac OS X. The problem is: 1) that <SDL_main.h> should be included in files that define the main function for SDL Mac OS X programs (this is not true with the upcoming SDL 1.3 release). 2) that -lSDLmain, because it is statically linked, needs the Cocoa framework in the LDADD of the main program. Again, 1.3 will not require this.
This commit is contained in:
parent
8a5b55ca6c
commit
993941cfd7
4 changed files with 16 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ cairo_perf_SOURCES += cairo-perf-posix.c
|
|||
endif
|
||||
endif
|
||||
|
||||
if CAIRO_HAS_SDL_SURFACE
|
||||
cairo_perf_LDADD = $(LDADD) $(sdl_LIBS)
|
||||
endif
|
||||
|
||||
libcairoperf_la_SOURCES = \
|
||||
cairo-perf-report.c \
|
||||
cairo-stats.c \
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@
|
|||
|
||||
#include "cairo-boilerplate-getopt.h"
|
||||
|
||||
#if CAIRO_HAS_SDL_SURFACE
|
||||
#include <SDL_main.h>
|
||||
#endif
|
||||
|
||||
/* For basename */
|
||||
#ifdef HAVE_LIBGEN_H
|
||||
#include <libgen.h>
|
||||
|
|
|
|||
|
|
@ -294,6 +294,10 @@ if HAVE_PTHREAD
|
|||
cairo_test_suite_LDADD += -lpthread
|
||||
endif
|
||||
|
||||
if CAIRO_HAS_SDL_SURFACE
|
||||
cairo_test_suite_LDADD += $(sdl_LIBS)
|
||||
endif
|
||||
|
||||
BUILT_SOURCES += cairo-test-constructors.c
|
||||
noinst_SCRIPTS = make-cairo-test-constructors.pl
|
||||
EXTRA_DIST += $(BUILT_SOURCES) $(noinst_SCRIPTS) COPYING
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@
|
|||
#undef CAIRO_VERSION_MICRO
|
||||
#include "../cairo-version.h"
|
||||
|
||||
#if CAIRO_HAS_SDL_SURFACE
|
||||
#include <SDL_main.h>
|
||||
#endif
|
||||
|
||||
#include <pixman.h> /* for version information */
|
||||
|
||||
#if HAVE_FORK && HAVE_WAITPID
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue