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>
This commit is contained in:
parent
8ebd9817e7
commit
4e952328ca
|
@ -226,7 +226,7 @@ demo_clients = [
|
|||
{ 'basename': 'clickdot' },
|
||||
{
|
||||
'basename': 'cliptest',
|
||||
'add_sources': [ '../libweston/vertex-clipping.c' ]
|
||||
'dep_objs': dep_vertex_clipping
|
||||
},
|
||||
{ 'basename': 'confine' },
|
||||
{ 'basename': 'dnd' },
|
||||
|
@ -277,7 +277,7 @@ if get_option('demo-clients')
|
|||
foreach t : demo_clients
|
||||
t_name = 'weston-' + t.get('basename')
|
||||
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', [])
|
||||
dep = dependency(depname, required: false)
|
||||
if not dep.found()
|
||||
|
|
|
@ -433,6 +433,10 @@ if get_option('backend-fbdev')
|
|||
install_headers(backend_fbdev_h, subdir: dir_include_libweston_install)
|
||||
endif
|
||||
|
||||
dep_vertex_clipping = declare_dependency(
|
||||
sources: 'vertex-clipping.c',
|
||||
include_directories: include_directories('.')
|
||||
)
|
||||
|
||||
if get_option('renderer-gl')
|
||||
config_h.set('ENABLE_EGL', '1')
|
||||
|
@ -440,7 +444,6 @@ if get_option('renderer-gl')
|
|||
srcs_renderer_gl = [
|
||||
'gl-renderer.c',
|
||||
'linux-sync-file.c',
|
||||
'vertex-clipping.c',
|
||||
'../shared/matrix.c',
|
||||
linux_dmabuf_unstable_v1_protocol_c,
|
||||
linux_dmabuf_unstable_v1_server_protocol_h,
|
||||
|
@ -450,6 +453,7 @@ if get_option('renderer-gl')
|
|||
dep_pixman,
|
||||
dep_libweston,
|
||||
dep_libdrm_headers,
|
||||
dep_vertex_clipping
|
||||
]
|
||||
|
||||
foreach name : [ 'egl', 'glesv2' ]
|
||||
|
|
|
@ -99,12 +99,7 @@ tests_standalone = [
|
|||
['config-parser', [], [ dep_zucmain ]],
|
||||
['matrix', [ '../shared/matrix.c' ], [ dep_libm, dep_libshared.partial_dependency(includes: true) ]],
|
||||
['string'],
|
||||
[
|
||||
'vertex-clip',
|
||||
[
|
||||
'../libweston/vertex-clipping.c'
|
||||
]
|
||||
],
|
||||
[ 'vertex-clip', [], [ dep_test_client, dep_vertex_clipping ]],
|
||||
['timespec', [], [ dep_zucmain ]],
|
||||
['zuc',
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue