summaryrefslogtreecommitdiff
path: root/core/src/lcurses/xmake.lua
blob: 9588518be4487a8502706a698088aee69e1a6494 (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
-- add target
target("lcurses")

    -- enable this target?
    if not has_config("curses") and not has_config("pdcurses") then
        set_default(false)
    end

    -- make as a static library
    set_kind("static")

    -- add deps
    add_deps("luajit")
    if is_plat("windows") and has_config("pdcurses") then
        add_deps("pdcurses")
    end

    -- add the common source files
    add_files("lcurses.c")
    add_defines("XM_CONFIG_API_HAVE_CURSES", {public = true})
  
    -- add options
    if is_plat("windows") then
        add_options("pdcurses")
        set_languages("c89")
    else
        add_options("curses")
    end