Add support for mingw
This commit is contained in:
parent
0c515b2c31
commit
8d4639d8e1
10
xmake.lua
10
xmake.lua
|
|
@ -25,7 +25,7 @@ local modules = {
|
||||||
Network = {
|
Network = {
|
||||||
Deps = {"NazaraCore"},
|
Deps = {"NazaraCore"},
|
||||||
Custom = function()
|
Custom = function()
|
||||||
if is_plat("windows") then
|
if is_plat("windows") or is_plat("mingw") then
|
||||||
add_syslinks("ws2_32")
|
add_syslinks("ws2_32")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ local modules = {
|
||||||
OpenGLRenderer = {
|
OpenGLRenderer = {
|
||||||
Deps = {"NazaraRenderer"},
|
Deps = {"NazaraRenderer"},
|
||||||
Custom = function()
|
Custom = function()
|
||||||
if is_plat("windows") then
|
if is_plat("windows") or is_plat("mingw") then
|
||||||
add_syslinks("gdi32", "user32")
|
add_syslinks("gdi32", "user32")
|
||||||
else
|
else
|
||||||
del_files("src/Nazara/OpenGLRenderer/Wrapper/Win32/**.cpp")
|
del_files("src/Nazara/OpenGLRenderer/Wrapper/Win32/**.cpp")
|
||||||
|
|
@ -62,7 +62,7 @@ local modules = {
|
||||||
Deps = {"NazaraUtility"},
|
Deps = {"NazaraUtility"},
|
||||||
Packages = {"libsdl"},
|
Packages = {"libsdl"},
|
||||||
Custom = function()
|
Custom = function()
|
||||||
if is_plat("windows") then
|
if is_plat("windows") or is_plat("mingw") then
|
||||||
add_defines("SDL_VIDEO_DRIVER_WINDOWS=1")
|
add_defines("SDL_VIDEO_DRIVER_WINDOWS=1")
|
||||||
elseif is_plat("linux") then
|
elseif is_plat("linux") then
|
||||||
add_defines("SDL_VIDEO_DRIVER_X11=1")
|
add_defines("SDL_VIDEO_DRIVER_X11=1")
|
||||||
|
|
@ -86,7 +86,7 @@ local modules = {
|
||||||
Deps = {"NazaraRenderer"},
|
Deps = {"NazaraRenderer"},
|
||||||
Custom = function()
|
Custom = function()
|
||||||
add_defines("VK_NO_PROTOTYPES")
|
add_defines("VK_NO_PROTOTYPES")
|
||||||
if is_plat("windows") then
|
if is_plat("windows") or is_plat("mingw") then
|
||||||
add_defines("VK_USE_PLATFORM_WIN32_KHR")
|
add_defines("VK_USE_PLATFORM_WIN32_KHR")
|
||||||
add_syslinks("user32")
|
add_syslinks("user32")
|
||||||
elseif is_plat("linux") then
|
elseif is_plat("linux") then
|
||||||
|
|
@ -188,7 +188,7 @@ for name, module in pairs(modules) do
|
||||||
add_files(filepath, {rule = "embed_resources"})
|
add_files(filepath, {rule = "embed_resources"})
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_plat("windows") then
|
if is_plat("windows") or is_plat("mingw") then
|
||||||
del_files("src/Nazara/" .. name .. "/Posix/**.cpp")
|
del_files("src/Nazara/" .. name .. "/Posix/**.cpp")
|
||||||
else
|
else
|
||||||
del_files("src/Nazara/" .. name .. "/Win32/**.cpp")
|
del_files("src/Nazara/" .. name .. "/Win32/**.cpp")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue