diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-10-20 17:49:42 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-11-02 11:39:45 -0700 |
commit | a29869e8720b385d3692f6a74de2921412b2c8c1 (patch) | |
tree | 5e9dab02c13d28896ee151572d6b074ddb38295a /src/gbm | |
parent | 10d869535cc704c6f787f6759951bb5c87969b29 (diff) |
gbm: Don't traverse backwards for includes
This is just a bad idea and should be avoided. Instead, make the #include
flat and fix the build systems to pass the proper -I flags
v2: - add an inc_wayland_drm instead passing a path to
include_directories (Emil)
- update commit message (Emil)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Diffstat (limited to 'src/gbm')
-rw-r--r-- | src/gbm/Makefile.am | 4 | ||||
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 2 | ||||
-rw-r--r-- | src/gbm/meson.build | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am index 805208a3ca91..05d861ff999d 100644 --- a/src/gbm/Makefile.am +++ b/src/gbm/Makefile.am @@ -31,7 +31,9 @@ libgbm_la_LIBADD = \ $(DLOPEN_LIBS) if HAVE_PLATFORM_WAYLAND -AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS) +AM_CFLAGS += \ + $(WAYLAND_SERVER_CFLAGS) \ + -I$(top_srcdir)/src/egl/wayland/wayland-drm/ libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_SERVER_LIBS) endif diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 0a4853bf63d0..b2121cbc3405 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -53,7 +53,7 @@ /* For importing wl_buffer */ #if HAVE_WAYLAND_PLATFORM -#include "../../../egl/wayland/wayland-drm/wayland-drm.h" +#include "wayland-drm.h" #endif #ifndef DRM_FORMAT_MOD_INVALID diff --git a/src/gbm/meson.build b/src/gbm/meson.build index ff3cf3f61d91..437896ef7f01 100644 --- a/src/gbm/meson.build +++ b/src/gbm/meson.build @@ -31,6 +31,10 @@ deps_gbm = [] args_gbm = [] links_gbm = [] deps_gbm = [] +incs_gbm = [ + include_directories('main'), inc_include, inc_src, inc_loader, + inc_wayland_drm, +] if with_dri2 files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h') @@ -40,6 +44,7 @@ endif if with_platform_wayland deps_gbm += dep_wayland_server links_gbm += libwayland_drm + incs_gbm += inc_wayland_drm endif # TODO: wayland support (requires egl) @@ -47,9 +52,7 @@ endif libgbm = shared_library( 'gbm', files_gbm, - include_directories : [ - include_directories('main'), inc_include, inc_src, inc_loader, - include_directories('../egl/wayland/wayland-drm')], + include_directories : incs_gbm, c_args : [c_vis_args, args_gbm], link_args : [ld_args_gc_sections], link_with : [links_gbm, libloader, libmesa_util, libxmlconfig], |