summaryrefslogtreecommitdiff
path: root/tests/projects/requires/xmake.lua
blob: 8857c4b4fd65c2669ece5377ce009a591f61cd8d (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-- define package
package("mbedtls")
    set_urls("https://github.com/ARMmbed/mbedtls.git")
    add_deps("https://github.com/glennrp/libpng.git@libpng >=1.6.28")
package_end()

-- group packages
package("zlib-mbedtls")
    add_deps("zlib >=1.2.11", {system = false})
    add_deps("mbedtls")
package_end()

-- requires
add_requires("zlib-mbedtls")
add_requires("[email protected] ~1.6.0", {alias = "tbox"})
add_requires("unknown", {optional = true})

-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

-- add target
target("console_c")

    -- set kind
    set_kind("binary")

    -- add files
    add_files("src/*.c") 

    -- add packages
    add_packages("tbox", "zlib-mbedtls")