forked from Bush2021/chrome_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
40 lines (32 loc) · 1.24 KB
/
xmake.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
includes("VC-LTL5.lua")
add_rules("mode.debug", "mode.release")
set_warnings("more")
add_defines("WIN32", "_WIN32")
add_defines("UNICODE", "_UNICODE", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE")
if is_mode("release") then
add_defines("NDEBUG")
add_cxflags("/O2", "/Os", "/Gy", "/MT", "/EHsc", "/fp:precise")
add_ldflags("/DYNAMICBASE", "/LTCG")
end
add_cxflags("/utf-8")
-- add_links("gdiplus", "kernel32", "user32", "gdi32", "winspool", "comdlg32")
-- add_links("advapi32", "shell32", "ole32", "oleaut32", "uuid", "odbc32", "odbccp32")
add_links("kernel32", "user32", "shell32", "oleaut32", "propsys", "shlwapi", "crypt32", "advapi32", "netapi32")
target("detours")
set_kind("static")
add_files("detours/src/*.cpp|uimports.cpp")
add_includedirs("detours/src", {public=true})
target("chrome_plus")
set_kind("shared")
set_targetdir("$(buildir)/release")
set_basename("version")
add_deps("detours")
add_links("detours")
add_files("src/*.cpp")
add_files("src/*.rc")
add_links("user32")
add_cxflags("/std:c++17")
after_build(function (target)
os.rm("$(buildir)/release/version.exp")
os.rm("$(buildir)/release/version.lib")
end)