blob: bc7b0dd68e4d7ad3a8d74835573aa0791e9ea41d (
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
|
add_rules("mode.debug", "mode.release")
target("foo")
set_kind("shared")
add_files("src/foo.cpp")
add_rules("utils.symbols.export_all", {export_classes = true})
target("bar")
set_kind("shared")
add_files("src/bar.cpp")
add_rules("utils.symbols.export_all", {export_filter = function (symbol, opt)
local filepath = opt.sourcefile or opt.objectfile
if filepath and filepath:find("bar.cpp", 1, true) and symbol:find("add", 1, true) then
print("export: %s at %s", symbol, filepath)
return true
end
end})
target("demo")
set_kind("binary")
add_deps("foo", "bar")
add_files("src/main.cpp")
|