mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
build: expose automake conditionals for cogl winsys
Expose the ./configured window system/backend options to the Cogl automake files via some new SUPPORT_XYZ conditionals.
This commit is contained in:
parent
a29d1b799a
commit
f2f2e9b7e6
@ -20,7 +20,7 @@ DISTCLEANFILES =
|
||||
EXTRA_DIST =
|
||||
BUILT_SOURCES =
|
||||
|
||||
if WINSYS_WIN32
|
||||
if SUPPORT_WIN32
|
||||
|
||||
# Ideally this resources stuff would go in win32/ but libtool doesn't
|
||||
# seem to pass on the -Wl argument when linking a convenience library
|
||||
@ -35,7 +35,7 @@ win32/resources.o : $(srcdir)/win32/invisible-cursor.cur
|
||||
win32_resources = win32/resources.o
|
||||
win32_resources_ldflag = -Wl,win32/resources.o
|
||||
|
||||
endif # WINSYS_WIN32
|
||||
endif # SUPPORT_WIN32
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
|
@ -71,20 +71,8 @@ cogl_public_h = \
|
||||
$(srcdir)/cogl.h \
|
||||
$(NULL)
|
||||
|
||||
# windowing system; all sources have to be distributed, but we'll
|
||||
# compile just the one we need
|
||||
cogl_winsys_sources = \
|
||||
$(srcdir)/winsys/cogl-eglnative.c \
|
||||
$(srcdir)/winsys/cogl-eglx.c \
|
||||
$(srcdir)/winsys/cogl-glx.c \
|
||||
$(srcdir)/winsys/cogl-osx.c \
|
||||
$(srcdir)/winsys/cogl-sdl.c \
|
||||
$(srcdir)/winsys/cogl-win32.c \
|
||||
$(NULL)
|
||||
|
||||
cogl_sources_c = \
|
||||
$(srcdir)/winsys/cogl-winsys.h \
|
||||
$(srcdir)/winsys/cogl-@COGL_WINSYS@.c \
|
||||
$(srcdir)/cogl-handle.h \
|
||||
$(srcdir)/cogl-context.h \
|
||||
$(srcdir)/cogl-context.c \
|
||||
@ -161,7 +149,31 @@ libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) $(top_builddir)/clutter/cogl/cog
|
||||
|
||||
libclutter_cogl_la_SOURCES = $(BUILT_SOURCES) $(cogl_sources_c)
|
||||
|
||||
EXTRA_DIST += $(cogl_winsys_sources)
|
||||
if SUPPORT_GLX
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-glx.c
|
||||
endif
|
||||
if SUPPORT_EGL_PLATFORM_POWERVR_X11
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-eglx.c
|
||||
endif
|
||||
if SUPPORT_EGL_PLATFORM_POWERVR_NULL
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-eglnative.c
|
||||
endif
|
||||
if SUPPORT_EGL_PLATFORM_FRUITY
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-fruity.c
|
||||
endif
|
||||
if SUPPORT_WIN32
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-win32.c
|
||||
endif
|
||||
if SUPPORT_OSX
|
||||
libclutter_cogl_la_SOURCES += \
|
||||
$(srcdir)/winsys/cogl-osx.c
|
||||
endif
|
||||
|
||||
EXTRA_DIST += stb_image.c
|
||||
|
||||
# COGL installed headers
|
||||
|
16
configure.ac
16
configure.ac
@ -351,7 +351,21 @@ AS_CASE([$CLUTTER_WINSYS],
|
||||
[AC_MSG_ERROR([Invalid backend for Clutter: use glx, osx, win32, eglx, eglnative or fruity])]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL(WINSYS_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"])
|
||||
# winsys conditionals for use in automake files...
|
||||
AM_CONDITIONAL(SUPPORT_GLX, [test "x$CLUTTER_WINSYS" = "xglx"])
|
||||
AM_CONDITIONAL(SUPPORT_X11, [test "x$CLUTTER_WINSYS" = "xglx" -o \
|
||||
"x$CLUTTER_WINSYS" = "xeglx"])
|
||||
AM_CONDITIONAL(SUPPORT_XLIB, [test "x$CLUTTER_WINSYS" = "xglx" -o \
|
||||
"x$CLUTTER_WINSYS" = "xeglx"])
|
||||
AM_CONDITIONAL(SUPPORT_EGL,
|
||||
[test "x$CLUTTER_WINSYS" = "xeglx" -o \
|
||||
"x$CLUTTER_WINSYS" = "xeglnative" -o \
|
||||
"x$CLUTTER_WINSYS" = "xfruity"])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11, [test "x$CLUTTER_WINSYS" = "xeglx"])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_NULL, [test "x$CLUTTER_WINSYS" = "xeglnative"])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_FRUITY, [test "x$CLUTTER_WINSYS" = "xfruity"])
|
||||
AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"])
|
||||
AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"])
|
||||
|
||||
# at this point we must have a GL header to check
|
||||
AS_IF([test "x$clutter_gl_header" = "x"], [AC_MSG_ERROR([Internal error: no GL header set])])
|
||||
|
Loading…
Reference in New Issue
Block a user