build: use dependency for matrix.c

matrix.c needs to be built differently for a test program vs. everything else,
so it cannot be in a helper lib. Instead, make a dependency object for it for
easy use which always gets all the paths correct automatically.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 6 years ago
parent 03eacfa618
commit b6c7a3020c
  1. 10
      clients/meson.build
  2. 2
      libweston/meson.build
  3. 6
      shared/meson.build
  4. 2
      tests/meson.build

@ -163,11 +163,8 @@ tools_enabled = get_option('tools')
tools_list = [ tools_list = [
{ {
'name': 'calibrator', 'name': 'calibrator',
'sources': [ 'sources': [ 'calibrator.c' ],
'calibrator.c', 'deps': [ dep_toytoolkit, dep_matrix_c ],
'../shared/matrix.c',
],
'deps': [ dep_toytoolkit ],
}, },
{ {
'name': 'debug', 'name': 'debug',
@ -202,11 +199,10 @@ tools_list = [
'name': 'touch-calibrator', 'name': 'touch-calibrator',
'sources': [ 'sources': [
'touch-calibrator.c', 'touch-calibrator.c',
'../shared/matrix.c',
weston_touch_calibration_client_protocol_h, weston_touch_calibration_client_protocol_h,
weston_touch_calibration_protocol_c, weston_touch_calibration_protocol_c,
], ],
'deps': [ dep_toytoolkit ], 'deps': [ dep_toytoolkit, dep_matrix_c ],
}, },
] ]

@ -5,6 +5,7 @@ deps_libweston = [
dep_libdl, dep_libdl,
dep_libdrm_headers, dep_libdrm_headers,
dep_xkbcommon, dep_xkbcommon,
dep_matrix_c
] ]
srcs_libweston = [ srcs_libweston = [
git_version_h, git_version_h,
@ -31,7 +32,6 @@ srcs_libweston = [
'weston-log-flight-rec.c', 'weston-log-flight-rec.c',
'weston-log.c', 'weston-log.c',
'zoom.c', 'zoom.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,
linux_explicit_synchronization_unstable_v1_protocol_c, linux_explicit_synchronization_unstable_v1_protocol_c,

@ -76,3 +76,9 @@ dep_lib_cairo_shared = declare_dependency(
link_with: lib_cairo_shared, link_with: lib_cairo_shared,
dependencies: deps_cairo_shared dependencies: deps_cairo_shared
) )
dep_matrix_c = declare_dependency(
sources: 'matrix.c',
include_directories: public_inc,
dependencies: dep_libm
)

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

Loading…
Cancel
Save