aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-26 19:31:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-26 19:31:09 +0000
commitc6fb10863d0f985c1b9eb6a859086e761d393547 (patch)
tree29b9a6a7b4777010c9d9db59191e0ea897e58a4f /meson.build
parentfeatures: --version now logs +/-pgo (diff)
meson: build source files common to both foot and footclient as libraries
Source files used by both foot and footclient are now compiled as static libraries, which foot and footclient links against.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build19
1 files changed, 9 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index e1b23102..237d99c6 100644
--- a/meson.build
+++ b/meson.build
@@ -117,16 +117,18 @@ 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')
+
misc = static_library(
'misc',
- 'debug.c', 'debug.h',
'hsl.c', 'hsl.h',
- 'log.c', 'log.h',
'macros.h',
'misc.c', 'misc.h',
- 'uri.c', 'uri.h',
- 'xmalloc.c', 'xmalloc.h',
- 'xsnprintf.c', 'xsnprintf.h',
+ 'uri.c', 'uri.h'
)
vtlib = static_library(
@@ -140,7 +142,7 @@ vtlib = static_library(
wl_proto_src + wl_proto_headers,
version,
dependencies: [libepoll, pixman, fcft, tllist, wayland_client],
- link_with: misc,
+ link_with: [log, debug, misc, xmalloc],
)
pgolib = static_library(
@@ -195,14 +197,11 @@ executable(
executable(
'footclient',
'client.c', 'client-protocol.h',
- 'debug.c', 'debug.h',
'foot-features.h',
- 'log.c', 'log.h',
'macros.h',
'util.h',
- 'xmalloc.c', 'xmalloc.h',
- 'xsnprintf.c', 'xsnprintf.h',
version,
+ link_with: [log, debug, xmalloc],
install: true)
if tic.found()