From 557dc678fd603fa403a1cc8fe6f9353677d81162 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Wed, 13 Mar 2024 21:16:03 -0600 Subject: [PATCH] meson: we can now build libcmd! Change-Id: I3506b3d599cd038020d208b899f81b7251932fd8 --- meson.build | 8 ++++++++ src/libcmd/meson.build | 30 ++++++++++++++++++++++++++++++ src/libmain/meson.build | 5 +++++ 3 files changed, 43 insertions(+) create mode 100644 src/libcmd/meson.build diff --git a/meson.build b/meson.build index f6d0d2db1..eecb17e09 100644 --- a/meson.build +++ b/meson.build @@ -104,6 +104,12 @@ deps += sodium curl = dependency('libcurl', 'curl', required : true) deps += curl +editline = dependency('libeditline', 'editline', version : '>=1.14', required : true) +deps += editline + +lowdown = dependency('lowdown', version : '>=0.9.0', required : true) +deps += lowdown + # # Build-time tools # @@ -199,3 +205,5 @@ subdir('src/libfetchers') subdir('src/libexpr') # libmain depends on libutil and libstore. subdir('src/libmain') +# libcmd depends on everything +subdir('src/libcmd') diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build new file mode 100644 index 000000000..665001dd7 --- /dev/null +++ b/src/libcmd/meson.build @@ -0,0 +1,30 @@ +libcmd_sources = files( + 'built-path.cc', + 'command-installable-value.cc', + 'command.cc', + 'common-eval-args.cc', + 'editor-for.cc', + 'installable-attr-path.cc', + 'installable-derived-path.cc', + 'installable-flake.cc', + 'installable-value.cc', + 'installables.cc', + 'legacy.cc', + 'markdown.cc', + 'repl.cc', +) + +libcmd = library( + 'nixcmd', + libcmd_sources, + dependencies : [ + liblixutil, + liblixstore, + liblixexpr, + liblixfetchers, + liblixmain, + boehm, + editline, + lowdown, + ], +) diff --git a/src/libmain/meson.build b/src/libmain/meson.build index 270c26b62..2046fa424 100644 --- a/src/libmain/meson.build +++ b/src/libmain/meson.build @@ -14,3 +14,8 @@ libmain = library( liblixstore, ], ) + +liblixmain = declare_dependency( + include_directories : include_directories('.'), + link_with : libmain, +)