build: turn vertex-clipping.c into a dependency

Making this into a dependency object not only carries the .c files with it, but
it also brings the include directories as well, which means the users can
simply use the object without guessing the paths.

This should help with moving GL-renderer into a new subdirectory.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 6 years ago
parent 8ebd9817e7
commit 4e952328ca
  1. 4
      clients/meson.build
  2. 6
      libweston/meson.build
  3. 7
      tests/meson.build

@ -226,7 +226,7 @@ demo_clients = [
{ 'basename': 'clickdot' }, { 'basename': 'clickdot' },
{ {
'basename': 'cliptest', 'basename': 'cliptest',
'add_sources': [ '../libweston/vertex-clipping.c' ] 'dep_objs': dep_vertex_clipping
}, },
{ 'basename': 'confine' }, { 'basename': 'confine' },
{ 'basename': 'dnd' }, { 'basename': 'dnd' },
@ -277,7 +277,7 @@ if get_option('demo-clients')
foreach t : demo_clients foreach t : demo_clients
t_name = 'weston-' + t.get('basename') t_name = 'weston-' + t.get('basename')
t_srcs = [ t.get('basename') + '.c' ] + t.get('add_sources', []) t_srcs = [ t.get('basename') + '.c' ] + t.get('add_sources', [])
t_deps = [ dep_toytoolkit ] t_deps = [ dep_toytoolkit, t.get('dep_objs', []) ]
foreach depname : t.get('deps', []) foreach depname : t.get('deps', [])
dep = dependency(depname, required: false) dep = dependency(depname, required: false)
if not dep.found() if not dep.found()

@ -433,6 +433,10 @@ if get_option('backend-fbdev')
install_headers(backend_fbdev_h, subdir: dir_include_libweston_install) install_headers(backend_fbdev_h, subdir: dir_include_libweston_install)
endif endif
dep_vertex_clipping = declare_dependency(
sources: 'vertex-clipping.c',
include_directories: include_directories('.')
)
if get_option('renderer-gl') if get_option('renderer-gl')
config_h.set('ENABLE_EGL', '1') config_h.set('ENABLE_EGL', '1')
@ -440,7 +444,6 @@ if get_option('renderer-gl')
srcs_renderer_gl = [ srcs_renderer_gl = [
'gl-renderer.c', 'gl-renderer.c',
'linux-sync-file.c', 'linux-sync-file.c',
'vertex-clipping.c',
'../shared/matrix.c', '../shared/matrix.c',
linux_dmabuf_unstable_v1_protocol_c, linux_dmabuf_unstable_v1_protocol_c,
linux_dmabuf_unstable_v1_server_protocol_h, linux_dmabuf_unstable_v1_server_protocol_h,
@ -450,6 +453,7 @@ if get_option('renderer-gl')
dep_pixman, dep_pixman,
dep_libweston, dep_libweston,
dep_libdrm_headers, dep_libdrm_headers,
dep_vertex_clipping
] ]
foreach name : [ 'egl', 'glesv2' ] foreach name : [ 'egl', 'glesv2' ]

@ -99,12 +99,7 @@ tests_standalone = [
['config-parser', [], [ dep_zucmain ]], ['config-parser', [], [ dep_zucmain ]],
['matrix', [ '../shared/matrix.c' ], [ dep_libm, dep_libshared.partial_dependency(includes: true) ]], ['matrix', [ '../shared/matrix.c' ], [ dep_libm, dep_libshared.partial_dependency(includes: true) ]],
['string'], ['string'],
[ [ 'vertex-clip', [], [ dep_test_client, dep_vertex_clipping ]],
'vertex-clip',
[
'../libweston/vertex-clipping.c'
]
],
['timespec', [], [ dep_zucmain ]], ['timespec', [], [ dep_zucmain ]],
['zuc', ['zuc',
[ [

Loading…
Cancel
Save