summaryrefslogtreecommitdiff
path: root/tests/projects/go/static_library_with_pkgs/xmake.lua
blob: 6943a29aa265d132ed458214b8fac81d3e3f9460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
add_rules("mode.debug", "mode.release")

add_requires("go::github.com/sirupsen/logrus", {alias = "logrus"})
add_requires("go::golang.org/x/sys/internal/unsafeheader", {alias = "unsafeheader"})
if is_plat("windows") then
    add_requires("go::golang.org/x/sys/windows", {alias = "syshost"})
else
    add_requires("go::golang.org/x/sys/unix", {alias = "syshost"})
end

target("module")
    set_kind("static")
    add_files("src/test/*.go")
    add_packages("logrus", "syshost", "unsafeheader")

target("test")
    set_kind("binary")
    add_deps("module")
    add_files("src/*.go")