summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-07-22 14:50:15 +0100
committerEric Engestrom <[email protected]>2019-08-03 00:08:37 +0000
commitd2d85b950d78c553b2694cda9ef0cc7bf9a0f737 (patch)
treeafdd28e30b66064b8b540a6e9d6d0ecbe27a6678 /src/util
parent8ddb38209d51c53d6e5792b04b97814dfce9bce6 (diff)
meson: replace libmesa_util with idep_mesautil
This automates the include_directories and dependencies tracking so that all users of libmesa_util don't need to add them manually. Next commit will remove the ones that were only added for that reason. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/meson.build18
-rw-r--r--src/util/tests/fast_idiv_by_const/meson.build3
-rw-r--r--src/util/tests/fast_urem_by_const/meson.build3
-rw-r--r--src/util/tests/hash_table/meson.build3
-rw-r--r--src/util/tests/set/meson.build3
-rw-r--r--src/util/tests/string_buffer/meson.build3
-rw-r--r--src/util/tests/timespec/meson.build3
-rw-r--r--src/util/tests/vma/meson.build2
8 files changed, 18 insertions, 20 deletions
diff --git a/src/util/meson.build b/src/util/meson.build
index 8aa7af921e1..d3c186366fb 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -132,7 +132,7 @@ format_srgb = custom_target(
capture : true,
)
-libmesa_util = static_library(
+_libmesa_util = static_library(
'mesa_util',
[files_mesa_util, format_srgb],
include_directories : inc_common,
@@ -141,12 +141,17 @@ libmesa_util = static_library(
build_by_default : false
)
+idep_mesautil = declare_dependency(
+ link_with : _libmesa_util,
+ include_directories : inc_util,
+ dependencies : [dep_zlib, dep_clock, dep_thread, dep_atomic, dep_m],
+)
+
libxmlconfig = static_library(
'xmlconfig',
files_xmlconfig,
include_directories : inc_common,
- link_with : libmesa_util,
- dependencies : [dep_expat, dep_m],
+ dependencies : [idep_mesautil, dep_expat, dep_m],
c_args : [
c_msvc_compat_args, c_vis_args,
'-DSYSCONFDIR="@0@"'.format(
@@ -173,7 +178,7 @@ if with_tests
'u_atomic_test',
files('u_atomic_test.c'),
include_directories : inc_common,
- link_with : libmesa_util,
+ dependencies : idep_mesautil,
c_args : [c_msvc_compat_args],
),
suite : ['util'],
@@ -197,7 +202,7 @@ if with_tests
'mesa-sha1_test',
files('mesa-sha1_test.c'),
include_directories : inc_common,
- link_with : libmesa_util,
+ dependencies : idep_mesautil,
c_args : [c_msvc_compat_args],
),
suite : ['util'],
@@ -209,8 +214,7 @@ if with_tests
'bitset_test',
files('bitset_test.cpp'),
include_directories : inc_common,
- dependencies : [dep_thread, dep_dl, idep_gtest],
- link_with : libmesa_util,
+ dependencies : [idep_mesautil, dep_thread, dep_dl, idep_gtest],
),
suite : ['util'],
)
diff --git a/src/util/tests/fast_idiv_by_const/meson.build b/src/util/tests/fast_idiv_by_const/meson.build
index 90ac7d15972..2caeabd287d 100644
--- a/src/util/tests/fast_idiv_by_const/meson.build
+++ b/src/util/tests/fast_idiv_by_const/meson.build
@@ -23,9 +23,8 @@ test(
executable(
'fast_idiv_by_const_test',
'fast_idiv_by_const_test.cpp',
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_mesautil],
include_directories : inc_common,
- link_with : [libmesa_util],
),
suite : ['util'],
)
diff --git a/src/util/tests/fast_urem_by_const/meson.build b/src/util/tests/fast_urem_by_const/meson.build
index 8bae51f0a83..58299b0ebf9 100644
--- a/src/util/tests/fast_urem_by_const/meson.build
+++ b/src/util/tests/fast_urem_by_const/meson.build
@@ -24,9 +24,8 @@ test(
executable(
'fast_urem_by_const_test',
'fast_urem_by_const_test.cpp',
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_mesautil],
include_directories : inc_common,
- link_with : [libmesa_util],
),
suite : ['util'],
)
diff --git a/src/util/tests/hash_table/meson.build b/src/util/tests/hash_table/meson.build
index 1ad3be3d063..54b7774dd3a 100644
--- a/src/util/tests/hash_table/meson.build
+++ b/src/util/tests/hash_table/meson.build
@@ -28,9 +28,8 @@ foreach t : ['clear', 'collision', 'delete_and_lookup', 'delete_management',
'@0@_test'.format(t),
files('@[email protected]'.format(t)),
c_args : [c_msvc_compat_args],
- dependencies : [dep_thread, dep_dl],
+ dependencies : [dep_thread, dep_dl, idep_mesautil],
include_directories : [inc_include, inc_util],
- link_with : libmesa_util,
),
suite : ['util'],
)
diff --git a/src/util/tests/set/meson.build b/src/util/tests/set/meson.build
index 5ab180c11eb..9d0d311ba5e 100644
--- a/src/util/tests/set/meson.build
+++ b/src/util/tests/set/meson.build
@@ -23,9 +23,8 @@ test(
executable(
'set_test',
'set_test.cpp',
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_mesautil],
include_directories : inc_common,
- link_with : [libmesa_util],
),
suite : ['util'],
)
diff --git a/src/util/tests/string_buffer/meson.build b/src/util/tests/string_buffer/meson.build
index f4e1a8e24e6..9ab25179ec3 100644
--- a/src/util/tests/string_buffer/meson.build
+++ b/src/util/tests/string_buffer/meson.build
@@ -23,9 +23,8 @@ test(
executable(
'string_buffer_test',
'string_buffer_test.cpp',
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_mesautil],
include_directories : inc_common,
- link_with : [libmesa_util],
),
suite : ['util'],
)
diff --git a/src/util/tests/timespec/meson.build b/src/util/tests/timespec/meson.build
index aa801bee188..c685db5fd99 100644
--- a/src/util/tests/timespec/meson.build
+++ b/src/util/tests/timespec/meson.build
@@ -23,9 +23,8 @@ test(
executable(
'timespec_test',
'timespec_test.cpp',
- dependencies : [dep_thread, dep_dl, idep_gtest],
+ dependencies : [dep_thread, dep_dl, idep_gtest, idep_mesautil],
include_directories : inc_common,
- link_with : [libmesa_util],
),
suite : ['util'],
)
diff --git a/src/util/tests/vma/meson.build b/src/util/tests/vma/meson.build
index 22137eb671e..1239c7b046a 100644
--- a/src/util/tests/vma/meson.build
+++ b/src/util/tests/vma/meson.build
@@ -24,7 +24,7 @@ test(
'vma_random_test',
'vma_random_test.cpp',
include_directories : [inc_include, inc_util],
- link_with : [libmesa_util],
+ dependencies : idep_mesautil,
),
suite : ['util'],
)