-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsw.cpp
More file actions
38 lines (37 loc) · 1.24 KB
/
sw.cpp
File metadata and controls
38 lines (37 loc) · 1.24 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
void build(Solution &s) {
auto &p = s.addProject("sw2");
auto &sw = p.addStaticLibrary("sw");
{
auto &t = sw;
t += cpp23;
t += "src/sw/.*"_rr;
t.Public += "src"_idir;
t += "src/sw"_idir; // remove?
if (t.getBuildSettings().TargetOS.Type == OSType::Windows) {
t += "ole32.lib"_slib;
t += "OleAut32.lib"_slib;
t += "advapi32.lib"_slib;
}
if (t.getBuildSettings().TargetOS.Type == OSType::Mingw) {
t += "org.sw.demo.mingw.w64.headers.windows.ole32-0.0.1"_dep;
t += "org.sw.demo.mingw.w64.headers.windows.oleaut32-0.0.1"_dep;
t += "org.sw.demo.mingw.w64.headers.windows.advapi32-0.0.1"_dep;
}
if (t.getCompilerType() == CompilerType::MSVC) {
t.Public.CompileOptions.push_back("/bigobj");
}
}
auto &exe = p.addExecutable("exe");
{
auto &t = exe;
t.SwDefinitions = true;
t.PackageDefinitions = true;
t += cpp23;
t += "src/client.cpp";
t.Public += "src"_idir;
t += sw;
}
}
// win: cl -nologo -std:c++latest -EHsc src/*.cpp -link -OUT:sw.exe
// lin: g++ -std=c++2b src/*.cpp -o sw
// mac: g++-12 -std=c++2b src/*.cpp -o sw