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)
This commit is contained in:
parent
10d869535c
commit
a29869e872
|
@ -18,6 +18,8 @@
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
inc_wayland_drm = include_directories('.')
|
||||||
|
|
||||||
wayland_drm_protocol_c = custom_target(
|
wayland_drm_protocol_c = custom_target(
|
||||||
'wayland-drm-protocol.c',
|
'wayland-drm-protocol.c',
|
||||||
input : 'wayland-drm.xml',
|
input : 'wayland-drm.xml',
|
||||||
|
|
|
@ -31,7 +31,9 @@ libgbm_la_LIBADD = \
|
||||||
$(DLOPEN_LIBS)
|
$(DLOPEN_LIBS)
|
||||||
|
|
||||||
if HAVE_PLATFORM_WAYLAND
|
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)
|
libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_SERVER_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
/* For importing wl_buffer */
|
/* For importing wl_buffer */
|
||||||
#if HAVE_WAYLAND_PLATFORM
|
#if HAVE_WAYLAND_PLATFORM
|
||||||
#include "../../../egl/wayland/wayland-drm/wayland-drm.h"
|
#include "wayland-drm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DRM_FORMAT_MOD_INVALID
|
#ifndef DRM_FORMAT_MOD_INVALID
|
||||||
|
|
|
@ -31,6 +31,10 @@ deps_gbm = []
|
||||||
args_gbm = []
|
args_gbm = []
|
||||||
links_gbm = []
|
links_gbm = []
|
||||||
deps_gbm = []
|
deps_gbm = []
|
||||||
|
incs_gbm = [
|
||||||
|
include_directories('main'), inc_include, inc_src, inc_loader,
|
||||||
|
inc_wayland_drm,
|
||||||
|
]
|
||||||
|
|
||||||
if with_dri2
|
if with_dri2
|
||||||
files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h')
|
files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h')
|
||||||
|
@ -40,6 +44,7 @@ endif
|
||||||
if with_platform_wayland
|
if with_platform_wayland
|
||||||
deps_gbm += dep_wayland_server
|
deps_gbm += dep_wayland_server
|
||||||
links_gbm += libwayland_drm
|
links_gbm += libwayland_drm
|
||||||
|
incs_gbm += inc_wayland_drm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# TODO: wayland support (requires egl)
|
# TODO: wayland support (requires egl)
|
||||||
|
@ -47,9 +52,7 @@ endif
|
||||||
libgbm = shared_library(
|
libgbm = shared_library(
|
||||||
'gbm',
|
'gbm',
|
||||||
files_gbm,
|
files_gbm,
|
||||||
include_directories : [
|
include_directories : incs_gbm,
|
||||||
include_directories('main'), inc_include, inc_src, inc_loader,
|
|
||||||
include_directories('../egl/wayland/wayland-drm')],
|
|
||||||
c_args : [c_vis_args, args_gbm],
|
c_args : [c_vis_args, args_gbm],
|
||||||
link_args : [ld_args_gc_sections],
|
link_args : [ld_args_gc_sections],
|
||||||
link_with : [links_gbm, libloader, libmesa_util, libxmlconfig],
|
link_with : [links_gbm, libloader, libmesa_util, libxmlconfig],
|
||||||
|
|
Loading…
Reference in New Issue