mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 20:24:39 +00:00
fix
This commit is contained in:
parent
6496a1cf44
commit
d89c121e53
84
premake5.lua
84
premake5.lua
@ -153,6 +153,52 @@ function default_stuffs()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function link_stuffs(cond)
|
||||||
|
filter({
|
||||||
|
"toolset:gcc or toolset:clang",
|
||||||
|
cond
|
||||||
|
})
|
||||||
|
links({
|
||||||
|
"stdc++:static"
|
||||||
|
})
|
||||||
|
for k,v in pairs(backends) do
|
||||||
|
for k2,v2 in pairs(v["backends"]) do
|
||||||
|
filter({
|
||||||
|
"options:backend=" .. k,
|
||||||
|
"options:" .. k .. "=" .. k2,
|
||||||
|
"system:windows",
|
||||||
|
cond
|
||||||
|
})
|
||||||
|
links(v.windows)
|
||||||
|
links(v2[2])
|
||||||
|
filter({
|
||||||
|
"options:backend=" .. k,
|
||||||
|
"options:" .. k .. "=" .. k2,
|
||||||
|
"system:not windows",
|
||||||
|
cond
|
||||||
|
})
|
||||||
|
links(v.unix)
|
||||||
|
links(v2[2])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
filter({
|
||||||
|
"system:windows",
|
||||||
|
cond
|
||||||
|
})
|
||||||
|
links({
|
||||||
|
"user32",
|
||||||
|
"ws2_32"
|
||||||
|
})
|
||||||
|
filter({
|
||||||
|
"system:not windows",
|
||||||
|
cond
|
||||||
|
})
|
||||||
|
links({
|
||||||
|
"m",
|
||||||
|
"pthread"
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
project("NishBox")
|
project("NishBox")
|
||||||
kind("ConsoleApp")
|
kind("ConsoleApp")
|
||||||
language("C")
|
language("C")
|
||||||
@ -168,41 +214,11 @@ project("NishBox")
|
|||||||
"Engine"
|
"Engine"
|
||||||
})
|
})
|
||||||
default_stuffs()
|
default_stuffs()
|
||||||
filter("toolset:gcc or toolset:clang")
|
link_stuffs("options:engine=static")
|
||||||
links({
|
|
||||||
"stdc++:static"
|
|
||||||
})
|
|
||||||
for k,v in pairs(backends) do
|
|
||||||
for k2,v2 in pairs(v["backends"]) do
|
|
||||||
filter({
|
|
||||||
"options:backend=" .. k,
|
|
||||||
"options:" .. k .. "=" .. k2,
|
|
||||||
"system:windows"
|
|
||||||
})
|
|
||||||
links(v.windows)
|
|
||||||
links(v2[2])
|
|
||||||
filter({
|
|
||||||
"options:backend=" .. k,
|
|
||||||
"options:" .. k .. "=" .. k2,
|
|
||||||
"system:not windows"
|
|
||||||
})
|
|
||||||
links(v.unix)
|
|
||||||
links(v2[2])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
filter("system:windows")
|
filter("system:windows")
|
||||||
files({
|
files({
|
||||||
"src/*.rc"
|
"src/*.rc"
|
||||||
})
|
})
|
||||||
links({
|
|
||||||
"user32",
|
|
||||||
"ws2_32"
|
|
||||||
})
|
|
||||||
filter("system:not windows")
|
|
||||||
links({
|
|
||||||
"m",
|
|
||||||
"pthread"
|
|
||||||
})
|
|
||||||
filter("configurations:Debug")
|
filter("configurations:Debug")
|
||||||
defines({
|
defines({
|
||||||
"DEBUG"
|
"DEBUG"
|
||||||
@ -227,6 +243,7 @@ project("Engine")
|
|||||||
"ODE_DLL",
|
"ODE_DLL",
|
||||||
"_DLL"
|
"_DLL"
|
||||||
})
|
})
|
||||||
|
link_stuffs("options:engine=dynamic")
|
||||||
filter("configurations:Debug")
|
filter("configurations:Debug")
|
||||||
defines({
|
defines({
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
@ -311,11 +328,6 @@ project("Engine")
|
|||||||
"external/ode/GIMPACT/**.cpp"
|
"external/ode/GIMPACT/**.cpp"
|
||||||
})
|
})
|
||||||
|
|
||||||
files({
|
|
||||||
"external/ode/OPCODE/**.h",
|
|
||||||
"external/ode/OPCODE/**.cpp"
|
|
||||||
})
|
|
||||||
|
|
||||||
removefiles({
|
removefiles({
|
||||||
"external/ode/ode/src/collision_trimesh_opcode.cpp"
|
"external/ode/ode/src/collision_trimesh_opcode.cpp"
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user