From c83a462b8c468478d3fddd4446eea8c5f7e428ba Mon Sep 17 00:00:00 2001 From: Yiheng Wu <36156959+jingkaimori@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:33:28 +0800 Subject: [PATCH] Add package cpp-linenoise (#2416) --- packages/c/cpp-linenoise/xmake.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/c/cpp-linenoise/xmake.lua diff --git a/packages/c/cpp-linenoise/xmake.lua b/packages/c/cpp-linenoise/xmake.lua new file mode 100644 index 000000000..39c973221 --- /dev/null +++ b/packages/c/cpp-linenoise/xmake.lua @@ -0,0 +1,20 @@ +package("cpp-linenoise") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/yhirose/cpp-linenoise") + set_description("A single file multi-platform (Unix, Windows) C++ header-only linenoise-based readline library.") + set_license("BSD-2-Clause") + + add_urls("https://github.com/yhirose/cpp-linenoise.git") + add_versions("2021.11.05", "4cd89adfbc07cedada1aa32be12991828919d91b") + + on_install(function (package) + os.cp("linenoise.hpp", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + void test() { + linenoise::SetMultiLine(true); + } + ]]}, {includes = {"linenoise.hpp"}})) + end)