summaryrefslogtreecommitdiff
path: root/tests/projects/package/toolchain_muslcc/xmake.lua
blob: b111d5976b4a3825268230f5a884026aadb55661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
add_rules("mode.debug", "mode.release")

-- set cross-compliation platform
set_plat("cross")
set_arch("arm")

-- lock requires
set_policy("package.requires_lock", true)

-- add library packages
-- for testing zlib/xmake, libplist/autoconf, libogg/cmake
add_requires("zlib", "libogg",  {system = false})
if is_host("macosx", "linux", "bsd") then
    add_requires("libplist", {system = false})
end

-- add toolchains package
add_requires("muslcc")

-- set global toolchains for target and packages
set_toolchains("@muslcc")

target("test")
    set_kind("binary")
    add_files("src/*.c")
    add_packages("zlib", "libplist", "libogg")
    if has_package("libplist") then
        add_defines("HAVE_LIBPLIST")
    end