aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-27 12:17:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-27 12:20:54 +0000
commitb5ceed7b2bfa41584e17d156ecac231dde195798 (patch)
tree9999ed40082632b6898ddb16ec33cc3023be96a5
parentchangelog: updated PGO build instructions (diff)
meson: replace log+debug+xmalloc static libraries with a single ‘common’ library
There are cyclic dependencies between the log, debug and xmalloc libraries. While having them as separate static libraries work, as long as consumers of them link against all of them, having them in a single library feels slightly better.
-rw-r--r--meson.build16
1 files changed, 9 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 54e5b315..9fbf99a6 100644
--- a/meson.build
+++ b/meson.build
@@ -117,11 +117,13 @@ version = custom_target(
output: 'version.h',
command: [generate_version_sh, meson.project_version(), '@SOURCE_ROOT@', '@OUTPUT@'])
-log = static_library('log', 'log.c', 'log.h')
-debug = static_library('debug', 'debug.c', 'debug.h')
-
-xmalloc = static_library(
- 'xmalloc', 'xmalloc.c', 'xmalloc.h', 'xsnprintf.c', 'xsnprintf.h')
+common = static_library(
+ 'common',
+ 'log.c', 'log.h',
+ 'debug.c', 'debug.h',
+ 'xmalloc.c', 'xmalloc.h',
+ 'xsnprintf.c', 'xsnprintf.h'
+)
misc = static_library(
'misc',
@@ -142,7 +144,7 @@ vtlib = static_library(
wl_proto_src + wl_proto_headers,
version,
dependencies: [libepoll, pixman, fcft, tllist, wayland_client],
- link_with: [log, debug, misc, xmalloc],
+ link_with: [common, misc],
)
pgolib = static_library(
@@ -203,7 +205,7 @@ executable(
'macros.h',
'util.h',
version,
- link_with: [log, debug, xmalloc],
+ link_with: common,
install: true)
if tic.found()