-- build/packages/g/great-project/xmake.lua package("great-project") set_description("The great-project package") add_urls("https://github.com/myrepo/foo.git") add_versions("1.0", "<shasum256 or gitcommit>") on_
xpack("xmakesrc")set_formats("runself")set_basename("xmake-v$(version)")set_prefixdir("xmake-$(version)")before_package(function(package)import("devel.git")local rootdir=path.join(os.tmpfile(package:basename())..".dir","repo")ifnot os.isdir(rootdir)then os.tryrm(rootdir)os.cp(path....
package("foo") set_description("The foo package") set_license("Apache-2.0") add_deps("add", "sub") on_load(function (package) package:set("installdir", path.join(os.scriptdir(), package:plat(), package:arch(), package:mode())) end) on_fetch(function (package) local result = {}...
target("perception.proto", function() set_kind("static") add_packages("protobuf") add_packages("zproto", "zgpu") add_rules("@my-package/protobuf_cpp") on_config(function(target) local zgpu_installdir = path.join(target:pkg("zgpu"):installdir(), "proto") local zproto_installdir =...
参考:https://xmake.io/#/zh-cn/package/local_package 可以通过 xmake create -t static test; xmake; xmake package 做一个 build/test.pkg 包你看下里面的 xmake.lua 内容 本质上就是利用 option 配置一堆 links/lindkirs/includedirs 然后配合 add_options/add_packages 使用就行了 option("package_xxx...
("A Perl Compatible Regular Expressions Library")add_configs("bitwidth",{description="Set the code unit width.",default="8",values={"8","16","32"}})on_load(function(package)local bitwidth=package:config("bitwidth")or"8"package:add("links","pcre2-"..bitwidth)package:add("defines",...
local e = package:config("shared") and "" or "-s" component:add("links", "sfml-window" .. e) if package:is_plat("windows", "mingw") and not package:config("shared") then component:add("syslinks", "opengl32", "gdi32", "user32", "advapi32") ...
xmake也是支持跟cmake的find_package类似的接口去直接查找系统库,然后集成使用,找到库后,会自动追加includedirs, links, linkdirs等相关设置。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 target("test") set_kind("binary") add_files("src/*.c") on_load(function (target) target:add(find_packag...
Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache Although less precise, one can still understand Xmake in the following way: Xmake ≈ Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache ...
error: execv(/usr/local/opt/llvm/bin/clang-tidy -p compile_commands.json /private/tmp/test2/src /main.cpp) failed(1) 指定检测类型 我们可以在--check=中指定需要检测的类型,具体用法可以参考clang-tidy的--check=参数,完全一致的。 $xmake check clang.tidy --checks="*"6 warnings and 1 error ...