From 6f6bcf4c91736b579d7b5ee16094cca13f4dfd82 Mon Sep 17 00:00:00 2001 From: xpxz <97490782+heheda123123@users.noreply.github.com> Date: Mon, 22 May 2023 17:23:24 +0800 Subject: [PATCH] add workspace_hanya library (#2104) * add mysql-connector-c * add vld * add vld * use has_cfuncs * add workspace * Fix mistakes * Delete packages/w/workspace directory * add workspace * Update xmake.lua * Update xmake.lua --------- Co-authored-by: xiaozhu Co-authored-by: cat --- packages/w/workspace_hanya/xmake.lua | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 packages/w/workspace_hanya/xmake.lua diff --git a/packages/w/workspace_hanya/xmake.lua b/packages/w/workspace_hanya/xmake.lua new file mode 100644 index 000000000..87d3c5a6b --- /dev/null +++ b/packages/w/workspace_hanya/xmake.lua @@ -0,0 +1,37 @@ +package("workspace_hanya") + + set_homepage("https://github.com/CodingHanYa/workspace") + set_description("Workspace is a lightweight asynchronous execution framework based on C++11") + set_license("Apache-2.0") + + set_urls("https://github.com/CodingHanYa/workspace.git") + + add_versions("2023.5.8", "d53b4f6a2900db328168ca7b496edc976308e4e6") + + add_deps("cmake") + + if is_plat("linux") then + add_syslinks("pthread") + end + + on_install("windows", "linux", "macosx", "mingw", function (package) + if is_plat("linux") then + io.replace("CMakeLists.txt", "install(DIRECTORY ${LIB_HEADER} DESTINATION ${INSTALL_INCLUDEDIR}/${LIB_NAME})", "install(DIRECTORY ${LIB_HEADER} DESTINATION ${LIB_NAME})", {plain = true}) + end + import("package.tools.cmake").install(package, configs) + os.cp("include", package:installdir()) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + + int main() { + wsp::workbranch br("My First BR", 2); + br.submit([]{ std::cout<<"hello world"<