summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-23 00:14:19 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-23 13:56:33 +0300
commit3fac104158fcbdd7d6d7ffb34e5db77f1f9ebeb5 (patch)
treef7ac0853bb9a3105d36629a268fb95d32e11c47a /test
parent41adc3f8d39e78eb432bf33ab859d1f5429b85dc (diff)
meson: Create and use a dependency for libcamera and its headers
Instead of manually adding the libcamera library and include path to every target that requires it, declare a dependency that groups the headers as source, the library and the include path, and use it through the project. This simplifies handling of the dependency. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r--test/camera/meson.build1
-rw-r--r--test/ipa/meson.build2
-rw-r--r--test/libtest/meson.build6
-rw-r--r--test/media_device/meson.build2
-rw-r--r--test/meson.build2
-rw-r--r--test/pipeline/ipu3/meson.build1
-rw-r--r--test/v4l2_device/meson.build1
-rw-r--r--test/v4l2_subdevice/meson.build1
8 files changed, 13 insertions, 3 deletions
diff --git a/test/camera/meson.build b/test/camera/meson.build
index b01e7e02..35e97ce5 100644
--- a/test/camera/meson.build
+++ b/test/camera/meson.build
@@ -9,6 +9,7 @@ camera_tests = [
foreach t : camera_tests
exe = executable(t[0], [t[1], 'camera_test.cpp'],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
test(t[0], exe, suite : 'camera', is_parallel : false)
diff --git a/test/ipa/meson.build b/test/ipa/meson.build
index 53015e38..ecde313c 100644
--- a/test/ipa/meson.build
+++ b/test/ipa/meson.build
@@ -5,6 +5,7 @@ ipa_modules_sources = [
foreach m : ipa_modules_sources
shared_library(m, name_prefix : '',
+ dependencies : libcamera_dep,
include_directories : test_includes_public)
endforeach
@@ -14,6 +15,7 @@ ipa_test = [
foreach t : ipa_test
exe = executable(t[0], t[1],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
diff --git a/test/libtest/meson.build b/test/libtest/meson.build
index e0893b70..ca762b44 100644
--- a/test/libtest/meson.build
+++ b/test/libtest/meson.build
@@ -2,15 +2,15 @@ libtest_sources = files([
'test.cpp',
])
-libtest = static_library('libtest', libtest_sources)
+libtest = static_library('libtest', libtest_sources,
+ dependencies : libcamera_dep)
libtest_includes = include_directories('.')
-test_libraries = [libcamera, libtest]
+test_libraries = [libtest]
test_includes_public = [
libtest_includes,
- libcamera_includes,
]
test_includes_internal = [
diff --git a/test/media_device/meson.build b/test/media_device/meson.build
index 124f454e..6a0e4684 100644
--- a/test/media_device/meson.build
+++ b/test/media_device/meson.build
@@ -9,10 +9,12 @@ media_device_tests = [
]
lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources,
+ dependencies : libcamera_dep,
include_directories : test_includes_internal)
foreach t : media_device_tests
exe = executable(t[0], t[1],
+ dependencies : libcamera_dep,
link_with : [test_libraries, lib_mdev_test],
include_directories : test_includes_internal)
diff --git a/test/meson.build b/test/meson.build
index ef413679..609aeab8 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -21,6 +21,7 @@ internal_tests = [
foreach t : public_tests
exe = executable(t[0], t[1],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_public)
@@ -29,6 +30,7 @@ endforeach
foreach t : internal_tests
exe = executable(t[0], t[1],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
diff --git a/test/pipeline/ipu3/meson.build b/test/pipeline/ipu3/meson.build
index 87074588..d02927c9 100644
--- a/test/pipeline/ipu3/meson.build
+++ b/test/pipeline/ipu3/meson.build
@@ -4,6 +4,7 @@ ipu3_test = [
foreach t : ipu3_test
exe = executable(t[0], t[1],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
diff --git a/test/v4l2_device/meson.build b/test/v4l2_device/meson.build
index 32556cf5..de540b1b 100644
--- a/test/v4l2_device/meson.build
+++ b/test/v4l2_device/meson.build
@@ -11,6 +11,7 @@ v4l2_device_tests = [
foreach t : v4l2_device_tests
exe = executable(t[0], [t[1], 'v4l2_device_test.cpp'],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
test(t[0], exe, suite : 'v4l2_device', is_parallel : false)
diff --git a/test/v4l2_subdevice/meson.build b/test/v4l2_subdevice/meson.build
index 282f6e23..0521984b 100644
--- a/test/v4l2_subdevice/meson.build
+++ b/test/v4l2_subdevice/meson.build
@@ -5,6 +5,7 @@ v4l2_subdevice_tests = [
foreach t : v4l2_subdevice_tests
exe = executable(t[0], [t[1], 'v4l2_subdevice_test.cpp'],
+ dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
test(t[0], exe, suite : 'v4l2_subdevice', is_parallel : false)