[cairo] Re: Proposal: Splitting cairo.h for the backends

Ned Konz ned at squeakland.org
Thu Jan 20 11:48:02 PST 2005


On Thursday 20 January 2005 12:37 am, Calum Robinson wrote:
> On 19 Jan 2005, at 23:16, Ned Konz wrote:
> > cairo.h (wherever):
> >
> > #include <cairo_config.h>  /* assumes on INCLUDE path */
> > #include CAIRO_MAIN_H
> > #include PIXMAN_H
> >
> > cairo_config.h (generated by configuration):
> >
> > #define PIXMAN_H <Cairo/pixman.h>
> > #define CAIRO_MAIN_H <Cairo/cairo_main.h>
>
> That wouldn't work, as the whole point is that the directory where
> cairo_config.h exists is not in the list of system include paths. What
> would work is a separate header for each backend type, like this:
>
> cairo_quartz.h:
> #include <Cairo/pixman.h>
> #include <Cairo/cairo.h>
>
>
> cairo_xlib.h:
> cairo_whatever.h:
> #include <pixman.h>
> #include <cairo.h>
>
> ...or some variation of that.

Just looking at XCode right now; the "Search Paths" description says:

Search Paths

These build settings specify space-separated lists of paths. Because the paths 
are separated by spaces, it is necessary to quote paths that include spaces 
in folder names. It is often necessary to add paths to folders that contain 
needed headers, frameworks, or libraries so that the compiler and linker can 
find all the files needed to build products. Because subfolders of search 
path folders are not recursively searched, search paths to all folders with 
needed content must be specified.

These search paths are used by the standard compiler and linker, but not for 
all build tools which may include or link to other files. For example, in 
order for Rez to find included files it may be necessary to add -i <path> to 
the OTHER_REZFLAGS for each folder containing included files.

HEADER_SEARCH_PATHS
This is a list of paths to folders to be searched by the compiler for included 
or imported header files when compiling C, Objective-C, C++, or 
Objective-C++.

LIBRARY_SEARCH_PATHS
This is a list of paths to folders to be searched by the linker for libraries 
used by the product.

FRAMEWORK_SEARCH_PATHS
This is a list of paths to folders containing frameworks to be searched by the 
compiler for both included or imported header files when compiling C, 
Objective-C, C++, or Objective-C++, and by the linker for frameworks used by 
the product.

etc.

Couldn't we just make a template project that is set up with these correctly, 
and not bother with editing the headers?

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the cairo mailing list