summaryrefslogtreecommitdiff
path: root/third_party/packages/t/tomlc99/xmake.lua
blob: 2cc22b676d2ae2a4a99b69755de6ef24f2eb8828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package("tomlc99")

set_homepage("https://github.com/cktan/tomlc99")
set_description("TOML C library ")
set_license("MIT")

set_urls("https://github.com/cktan/tomlc99.git")

on_install("linux", "macosx", "windows", "mingw", function(package)
    io.writefile("xmake.lua", [[
            add_rules("mode.debug", "mode.release")
            target("tomlc99")
                set_kind("static")
                add_files("toml.c")
                add_headerfiles("toml.h")
        ]])
    import("package.tools.xmake").install(package)
end)

on_test(function(package)
    assert(package:has_cfuncs("toml_parse_file", { includes = "toml.h" }))
end)