forked from psiberx/cp2077-archive-xl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
74 lines (63 loc) · 2.14 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
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
set_xmakever("2.5.9")
set_project("ArchiveXL")
set_version("1.4.0", {build = "%y%m%d%H%M"})
set_arch("x64")
set_languages("cxx20", "cxx2a")
set_optimize("none")
add_cxxflags("/MP /GR- /EHsc")
if is_mode("debug") then
set_symbols("debug")
add_cxxflags("/Od /Ob0 /Zi /RTC1")
elseif is_mode("release") then
set_symbols("hidden")
set_strip("all")
add_cxxflags("/O2 /Ob2 /fp:fast")
elseif is_mode("releasedbg") then
set_symbols("debug")
set_strip("all")
add_cxxflags("/O2 /Ob1 /fp:fast /Zi")
end
if is_mode("debug") then
set_runtimes("MDd")
else
set_runtimes("MD")
end
add_requires("fmt", "hopscotch-map", "minhook", "spdlog", "tiltedcore", "yaml-cpp")
add_defines("RED4EXT_STATIC_LIB", "YAML_CPP_STATIC_DEFINE")
target("ArchiveXL")
set_default(true)
set_kind("shared")
set_filename("ArchiveXL.dll")
set_pcxxheader("src/pch.hpp")
add_files("src/**.cpp", "src/**.rc", "lib/**.cpp")
add_headerfiles("src/**.hpp", "lib/**.hpp")
add_includedirs("src/", "lib/")
add_deps("RED4ext.SDK", "semver", "wil")
add_packages("fmt", "hopscotch-map", "minhook", "spdlog", "tiltedcore", "yaml-cpp")
add_syslinks("Version")
add_defines("WINVER=0x0601", "WIN32_LEAN_AND_MEAN", "NOMINMAX")
set_configdir("src")
add_configfiles("config/Project.hpp.in", {prefixdir = "App"})
add_configfiles("config/Version.rc.in", {prefixdir = "App"})
set_configvar("AUTHOR", "psiberx")
set_configvar("NAME", "ArchiveXL")
target("RED4ext.SDK")
set_default(false)
set_kind("static")
set_group("vendor")
add_files("vendor/RED4ext.SDK/src/**.cpp")
add_headerfiles("vendor/RED4ext.SDK/include/**.hpp")
add_includedirs("vendor/RED4ext.SDK/include/", { public = true })
target("semver")
set_default(false)
set_kind("static")
set_group("vendor")
add_headerfiles("vendor/semver/include/**.hpp")
add_includedirs("vendor/semver/include/", { public = true })
target("wil")
set_default(false)
set_kind("static")
set_group("vendor")
add_headerfiles("vendor/wil/include/**.h")
add_includedirs("vendor/wil/include/", { public = true })
add_rules("plugin.vsxmake.autoupdate")