anv/entrypoints: don't go using wayland/xcb unless they are configured
authorDave Airlie <airlied@redhat.com>
Sat, 4 Jun 2016 20:49:42 +0000 (06:49 +1000)
committerDave Airlie <airlied@redhat.com>
Sat, 4 Jun 2016 21:03:12 +0000 (07:03 +1000)
The fix in:
anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guards

breaks things if wayland headers aren't installed.

Separate things out properly to avoid that problem.

[airlied: fixed up to put in pre-existing sections].
Reported-by: Arjan van de Ven
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/intel/vulkan/Makefile.am

index 3294fa481796030725bea678ad9ac609c538c27e..db81838ff67b97d4e17107cc63d3e5ff313343d3 100644 (file)
@@ -82,12 +82,17 @@ VULKAN_SOURCES = \
 
 VULKAN_LIB_DEPS =
 
+VULKAN_ENTRYPOINT_CPPFLAGS =
 
 if HAVE_PLATFORM_X11
 AM_CPPFLAGS += \
        $(XCB_DRI3_CFLAGS) \
        -DVK_USE_PLATFORM_XCB_KHR
 
+VULKAN_ENTRYPOINT_CPPFLAGS += \
+       $(XCB_DRI3_CFLAGS) \
+       -DVK_USE_PLATFORM_XCB_KHR
+
 VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES)
 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS)
 endif
@@ -100,6 +105,10 @@ AM_CPPFLAGS += \
        $(WAYLAND_CFLAGS) \
        -DVK_USE_PLATFORM_WAYLAND_KHR
 
+VULKAN_ENTRYPOINT_CPPFLAGS += \
+       $(WAYLAND_CFLAGS) \
+       -DVK_USE_PLATFORM_WAYLAND_KHR
+
 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
 
 VULKAN_LIB_DEPS += \
@@ -124,12 +133,6 @@ VULKAN_LIB_DEPS += \
 nodist_EXTRA_libvulkan_intel_la_SOURCES = dummy.cpp
 libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)
 
-VULKAN_ENTRYPOINT_CPPFLAGS = \
-       $(XCB_DRI3_CFLAGS) \
-       $(WAYLAND_CFLAGS) \
-       -DVK_USE_PLATFORM_XCB_KHR \
-       -DVK_USE_PLATFORM_WAYLAND_KHR
-
 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
        $(AM_V_GEN)$(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS) $(top_srcdir)/include/vulkan/vulkan_intel.h |\
        $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@