forked from aimrebirth/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsw.cpp
More file actions
76 lines (66 loc) · 2.96 KB
/
sw.cpp
File metadata and controls
76 lines (66 loc) · 2.96 KB
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
#pragma sw require header org.sw.demo.lexxmark.winflexbison.bison-master
void build(Solution &s)
{
auto &tools = s.addProject("Polygon4.Tools", "master");
tools += Git("https://github.com/aimrebirth/tools", "", "{v}");
auto &common = tools.addStaticLibrary("common");
common.CPPVersion = CPPLanguageStandard::CPP17;
common.setRootDirectory("src/common");
common.Public += "pub.egorpugin.primitives.filesystem-master"_dep;
common.Public += "pub.egorpugin.primitives.sw.main-master"_dep;
auto add_exe = [&tools](const String &name) -> decltype(auto)
{
auto &t = tools.addExecutable(name);
t.CPPVersion = CPPLanguageStandard::CPP17;
t.setRootDirectory("src/" + name);
return t;
};
auto add_exe_with_common = [&add_exe, &common](const String &name) -> decltype(auto)
{
auto &t = add_exe(name);
t.Public += common;
return t;
};
auto add_exe_with_data_manager = [&add_exe_with_common](const String &name) -> decltype(auto)
{
auto &t = add_exe_with_common(name);
t.Public += "pub.lzwdgc.Polygon4.DataManager-master"_dep;
return t;
};
add_exe_with_data_manager("db_add_language") += "pub.egorpugin.primitives.executor-master"_dep;
add_exe_with_data_manager("db_extractor");
add_exe_with_data_manager("mmm_extractor");
add_exe_with_data_manager("mmo_extractor");
add_exe_with_common("mmp_extractor") += "org.sw.demo.intel.opencv.highgui-*"_dep;
add_exe_with_common("mpj_loader");
add_exe_with_common("tm_converter");
add_exe("name_generator");
add_exe_with_common("save_loader");
if (s.Settings.TargetOS.Arch == ArchType::x86)
add_exe("unpaker"); // 32-bit only
// not so simple targets
auto &script2txt = tools.addStaticLibrary("script2txt");
script2txt.CPPVersion = CPPLanguageStandard::CPP17;
script2txt.setRootDirectory("src/script2txt");
script2txt += "pub.lzwdgc.Polygon4.DataManager.schema-master"_dep;
gen_flex_bison_pair("org.sw.demo.lexxmark.winflexbison-master"_dep, script2txt, "LALR1_CPP_VARIANT_PARSER", "script2txt");
auto &model = tools.addStaticLibrary("model");
model.CPPVersion = CPPLanguageStandard::CPP17;
model.setRootDirectory("src/model");
model.Public += common,
"org.sw.demo.unicode.icu.i18n"_dep,
"org.sw.demo.eigen"_dep
;
add_exe("mod_reader") += model;
auto &mod_converter = add_exe("mod_converter");
mod_converter += model;
path sdk = "d:/arh/apps/Autodesk/FBX/FBX SDK/2019.0";
mod_converter += IncludeDirectory(sdk / "include");
String cfg = "release";
if (s.Settings.Native.ConfigurationType == ConfigurationType::Debug)
cfg = "debug";
String arch = "x64";
if (s.Settings.TargetOS.Arch == ArchType::x86)
arch = "x86";
mod_converter += LinkLibrary(sdk / ("lib/vs2015/" + arch + "/" + cfg + "/libfbxsdk-md.lib"));
}