-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.lua
83 lines (67 loc) · 1.98 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---@format disable
package.path = "./?.lua;./?/init.lua;" .. package.path
require "olua"
olua.AUTO_GEN_PROP = false
olua.ENABLE_EXCEPTION = true
-------------------------------------------------------------------------------
--- clang compile options
-------------------------------------------------------------------------------
clang {
"-DOLUA_DEBUG",
"-std=c++17",
"-I./olua",
"-I./lua",
"-I./src",
}
module "fs"
output_dir "src"
api_dir "addons/fs"
headers [[
#include "olua.hpp"
#include "fs_lua.h"
#include <filesystem>
]]
entry "std::filesystem"
luacls(function (cxxcls)
return cxxcls:gsub("std::filesystem::", "fs.")
:gsub("std::", "fs.")
:gsub("::", ".")
end)
exclude_type "std::filesystem::path::__string_view"
exclude_type "std::u16string"
exclude_type "std::u32string"
exclude_type "std::wstring"
exclude_type "time_point"
typedef "std::filesystem::path::string_type"
.luatype "string"
.conv "olua_$$_string"
typedef "std::filesystem::file_time_type"
.luatype "integer"
typeconf "std::error_code"
typeconf "std::error_category"
typeconf "std::error_condition"
typeconf "std::filesystem::path::format"
typeconf "std::filesystem::copy_options"
typeconf "std::filesystem::file_status"
typeconf "std::filesystem::file_type"
typeconf "std::filesystem::perm_options"
typeconf "std::filesystem::perms"
typeconf "std::filesystem::directory_options"
typeconf "std::filesystem::space_info"
typeconf "std::filesystem::directory_iterator"
.include "new"
.iterator "std::filesystem::directory_iterator"
.once "true"
typeconf "std::filesystem::recursive_directory_iterator"
.include "new"
.iterator "std::filesystem::recursive_directory_iterator"
.once "true"
typeconf "std::filesystem::directory_entry"
typeconf "std::filesystem::path"
.extend "fs::path_extend"
.from_string "true"
.iterator "std::filesystem::path::iterator"
typeconf "std::filesystem"
.extend "fs::fs_extend"
.exclude "begin"
.exclude "end"