build: simplify gtest/gmock dependencies
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iae1f3610f11ec9071cec36dd44495de2aec38aaa
diff --git a/test/meson.build b/test/meson.build
index 7659bb1..c33593a 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,7 +1,5 @@
-gtest_dep = dependency('gtest')
-gtest_main_dep = dependency('gtest_main')
-gmock_dep = dependency('gmock')
-gmock_main_dep = dependency('gmock_main')
+gtest_dep = dependency('gtest', main: true, disabler: true)
+gmock_dep = dependency('gmock', disabler: true)
tests = [
'bus/list_names',
@@ -25,7 +23,6 @@
dependencies: [
gtest_dep,
gmock_dep,
- gmock_main_dep,
sdbusplus_dep,
],
)
@@ -40,7 +37,6 @@
dependencies: [
boost_dep,
gmock_dep,
- gmock_main_dep,
gtest_dep,
sdbusplus_dep,
],
@@ -53,7 +49,10 @@
'test-vtable',
'vtable/vtable.cpp',
'vtable/vtable_c.c',
- dependencies: [ gtest_dep, gtest_main_dep, sdbusplus_dep ],
+ dependencies: [
+ gtest_dep,
+ sdbusplus_dep,
+ ],
),
)
@@ -77,7 +76,6 @@
include_directories: include_directories('server'),
dependencies: [
gmock_dep,
- gmock_main_dep,
gtest_dep,
sdbusplus_dep,
],