-
Notifications
You must be signed in to change notification settings - Fork 2
/
xmake.lua
54 lines (42 loc) · 1.44 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
set_xmakever("2.8.2")
includes("lib/CommonLibVR")
set_project("FTweaks")
set_version("1.1.0")
set_license("GPL-3.0")
set_languages("c++23")
set_warnings("allextra", "error")
set_defaultmode("releasedbg")
add_rules("mode.debug", "mode.releasedbg")
add_rules("plugin.vsxmake.autoupdate")
set_policy("package.requires_lock", true)
add_requires("simpleini")
set_config("skyrim_vr", false)
target("FTweaks")
add_deps("commonlibsse-ng")
add_packages("simpleini")
add_rules("commonlibsse-ng.plugin", {
name = "FTweaks",
author = "FTweaks Team",
description = "Fixes and tweaks for FTweaks"
})
add_files("source/**.cpp")
add_headerfiles("include/**.h")
add_includedirs("include", { public = true })
set_pcxxheader("include/PCH.h")
after_build(function(target)
local copy = function(env, ext)
for _, env in pairs(env:split(";")) do
if os.exists(env) then
local plugins = path.join(env, ext, "SKSE/Plugins")
os.mkdir(plugins)
os.trycp(target:targetfile(), plugins)
os.trycp(target:symbolfile(), plugins)
end
end
end
if os.getenv("XSE_TES5_MODS_PATH") then
copy(os.getenv("XSE_TES5_MODS_PATH"), target:name())
elseif os.getenv("XSE_TES5_GAME_PATH") then
copy(os.getenv("XSE_TES5_GAME_PATH"), "Data")
end
end)