Re: Building multiple backends on on same system

What I'd do is put all the headers in the same directory, but add a
#ifdef GDK_WINDOWING_X11 to the header and then put
-DGDK_WINDOWING_X11 into gtk+-3.0-x11.pc That way we avoid lots of
different include directories and IMO makes it easier to look for
header files in one's installation.
There's also the question of what we should do when someone includes
gdkx.h without having GDK_WINDOWING_X11 defined. Do nothing or #error
"You must add gtk+-3.0-x11 to your pkgconfig flags." The first one has
the benefit of not requiring lots of ifdefs for the include files, the
second makes the error output way better (because you don't have
missing function definition complaints from gcc, but useful output). I
vote or the second btw.


On Mon, Dec 13, 2010 at 4:03 AM, Matthias Clasen
<matthias clasen gmail com> wrote:
> On Sun, Dec 12, 2010 at 1:37 PM, Alexander Larsson <alexl redhat com> wrote:
>  backend.
>>> Yes, I am going to bring it back.
>> I see you added it back as it was before (i.e. a copy of the main one).
>> I dunno if it is very important, but the idea i had was to make e.g. gtk
>> +-3.0-x11.pc just depend on gtk+-3.0.pc but add -I $includedir/gtk
>> +-3.0-x11, which lets apps access $includedir/gtk+-3.0-x11/gdk/gdkx.h as
>> <gdk/gdkx.h>. A setup like this makes builds accessing gdkx.h without a
>> gtk+-3.0-x11.pc dependency fail at buildtime, which is nice.
> That would be nicer, indeed.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]