-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.lua
58 lines (55 loc) · 1.3 KB
/
make.lua
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
53
54
55
56
57
58
local lm = require "luamake"
local defines = {
"IMGUI_DISABLE_OBSOLETE_FUNCTIONS",
"IMGUI_DISABLE_OBSOLETE_KEYIO",
"IMGUI_DISABLE_DEBUG_TOOLS",
"IMGUI_DISABLE_DEMO_WINDOWS",
"IMGUI_DISABLE_DEFAULT_ALLOCATORS",
"IMGUI_USER_CONFIG=\\\"imgui_lua_config.h\\\"",
lm.os == "windows" and "IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
}
-- 非lua相关的代码放这里
-- 注意, 一定要有一个与文件夹名同名的 source_set, 否则会编译报错: `vaststars`: deps `ly.imgui.extend` undefine.
-- 这个source_set里面内容可以为空
lm:source_set "ly.imgui.extend" {
includes = {
lm.AntDir .. "/3rd/bee.lua",
lm.AntDir .. "/clibs/imgui",
lm.AntDir .. "/3rd/imgui",
},
sources = {
"text_editor/*.cpp",
"text_color/*.cpp",
"blueprint/*.cpp",
},
defines = {
defines,
},
msvc = {
flags = {
"/utf-8",
"/Zc:preprocessor",
}
}
}
-- lua绑定相关代码只能放在 lua_source中,不然编译不过
lm:lua_src "imgui" {
includes = {
lm.AntDir .. "/clibs/imgui",
lm.AntDir .. "/3rd/imgui",
lm.AntDir .. "/3rd/bee.lua",
},
sources = {
"luabinding.cpp",
"binding/*.cpp",
},
defines = {
defines,
},
msvc = {
flags = {
"/utf-8",
"/Zc:preprocessor",
}
}
}