Skip to content

Commit 3ee99d1

Browse files
committed
ci: next attempt
1 parent 8353b8e commit 3ee99d1

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

xmake.lua

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,34 @@ target("client")
6969
set_optimize("fastest")
7070
end
7171

72-
local plugin_sdk = os.getenv("PLUGIN_SDK_DIR")
73-
if plugin_sdk then
74-
add_includedirs(
72+
on_load(function (target)
73+
local plugin_sdk = os.getenv("PLUGIN_SDK_DIR")
74+
if not plugin_sdk then
75+
raise("PLUGIN_SDK_DIR environment variable is not set")
76+
end
77+
78+
target:add("includedirs",
7579
path.join(plugin_sdk, "shared"),
7680
path.join(plugin_sdk, "shared/game"),
7781
path.join(plugin_sdk, "shared/dxsdk"),
7882
path.join(plugin_sdk, "plugin_sa"),
7983
path.join(plugin_sdk, "plugin_sa/game_sa")
8084
)
8185

82-
add_linkdirs(
86+
target:add("linkdirs",
8387
path.join(plugin_sdk, "output/lib"),
8488
path.join(plugin_sdk, "shared/bass"),
8589
path.join(plugin_sdk, "shared/dxsdk")
8690
)
8791

8892
if is_mode("debug") then
89-
add_links("plugin_d")
93+
target:add("links", "plugin_d")
9094
else
91-
add_links("plugin")
95+
target:add("links", "plugin")
9296
end
9397

94-
add_links("d3dx9")
95-
else
96-
raise("PLUGIN_SDK_DIR environment variable is not set")
97-
end
98+
target:add("links", "d3dx9")
99+
end)
98100

99101
target("server")
100102
set_kind("binary")

0 commit comments

Comments
 (0)