Replace platform backends by SDL
This commit is contained in:
@@ -2,57 +2,17 @@ MODULE.Name = "Platform"
|
||||
|
||||
MODULE.ClientOnly = true
|
||||
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility"
|
||||
MODULE.Defines = {
|
||||
"NAZARA_PLATFORM_SDL2"
|
||||
}
|
||||
|
||||
if (Config.PlatformSDL2) then
|
||||
table.insert(MODULE.Defines, "NAZARA_PLATFORM_SDL2")
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility",
|
||||
"SDL2"
|
||||
}
|
||||
|
||||
table.insert(MODULE.Files, "../src/Nazara/Platform/SDL2/**.hpp")
|
||||
table.insert(MODULE.Files, "../src/Nazara/Platform/SDL2/**.cpp")
|
||||
|
||||
table.insert(MODULE.Libraries, "SDL2")
|
||||
|
||||
assert(Config.PlatformSDL2_Path)
|
||||
MODULE.Includes = Config.PlatformSDL2_Path .. "/include"
|
||||
MODULE.LibraryPaths.x64 = {
|
||||
Config.PlatformSDL2_Path .. "/lib/x64/",
|
||||
Config.PlatformSDL2_Path .. "/bin/x64/"
|
||||
}
|
||||
MODULE.LibraryPaths.x86 = {
|
||||
Config.PlatformSDL2_Path .. "/lib/x86/",
|
||||
Config.PlatformSDL2_Path .. "/bin/x86/"
|
||||
}
|
||||
|
||||
MODULE.FilesExcluded = {
|
||||
"../src/Nazara/Platform/Win32/**",
|
||||
"../src/Nazara/Platform/X11/**"
|
||||
}
|
||||
else
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Platform/Win32/**.hpp",
|
||||
"../src/Nazara/Platform/Win32/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Platform/X11/**.hpp",
|
||||
"../src/Nazara/Platform/X11/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsLibraries.Windows = {
|
||||
"gdi32"
|
||||
}
|
||||
|
||||
MODULE.OsLibraries.Posix = {
|
||||
"X11",
|
||||
"xcb",
|
||||
"xcb-cursor",
|
||||
"xcb-ewmh",
|
||||
"xcb-icccm",
|
||||
"xcb-keysyms",
|
||||
"xcb-randr"
|
||||
}
|
||||
|
||||
end
|
||||
MODULE.Files = {
|
||||
"../src/Nazara/Platform/SDL2/**.hpp",
|
||||
"../src/Nazara/Platform/SDL2/**.cpp"
|
||||
}
|
||||
|
||||
@@ -9,51 +9,11 @@ MODULE.Defines = {
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility",
|
||||
"NazaraPlatform"
|
||||
"NazaraPlatform",
|
||||
"SDL2"
|
||||
}
|
||||
|
||||
if (Config.PlatformSDL2) then
|
||||
table.insert(MODULE.Defines, "NAZARA_PLATFORM_SDL2")
|
||||
|
||||
table.insert(MODULE.Files, "../src/Nazara/Renderer/SDL2/**.hpp")
|
||||
table.insert(MODULE.Files, "../src/Nazara/Renderer/SDL2/**.cpp")
|
||||
|
||||
table.insert(MODULE.Libraries, "SDL2")
|
||||
|
||||
assert(Config.PlatformSDL2_Path)
|
||||
MODULE.Includes = Config.PlatformSDL2_Path .. "/include"
|
||||
MODULE.LibraryPaths.x64 = {
|
||||
Config.PlatformSDL2_Path .. "/lib/x64/",
|
||||
Config.PlatformSDL2_Path .. "/bin/x64/"
|
||||
}
|
||||
MODULE.LibraryPaths.x86 = {
|
||||
Config.PlatformSDL2_Path .. "/lib/x86/",
|
||||
Config.PlatformSDL2_Path .. "/bin/x86/"
|
||||
}
|
||||
|
||||
MODULE.FilesExcluded = {
|
||||
"../src/Nazara/Renderer/Win32/**",
|
||||
"../src/Nazara/Renderer/GLX/**.cpp"
|
||||
}
|
||||
else
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Renderer/Win32/**.hpp",
|
||||
"../src/Nazara/Renderer/Win32/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Renderer/GLX/**.hpp",
|
||||
"../src/Nazara/Renderer/GLX/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsLibraries.Windows = {
|
||||
"gdi32",
|
||||
"opengl32",
|
||||
"winmm"
|
||||
}
|
||||
|
||||
MODULE.OsLibraries.Posix = {
|
||||
"GL",
|
||||
"X11"
|
||||
}
|
||||
end
|
||||
MODULE.Files = {
|
||||
"../src/Nazara/Renderer/SDL2/**.hpp",
|
||||
"../src/Nazara/Renderer/SDL2/**.cpp"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user