Merge branch '4-linux-support' into dev
This commit is contained in:
commit
0e2a3525e4
36 changed files with 2754 additions and 34 deletions
|
|
@ -17,8 +17,22 @@ if global_settings.debug then
|
|||
settings.cc.flags:Add("-DSPECTRE_DEBUG")
|
||||
end
|
||||
|
||||
-- Platform
|
||||
if TARGET_OS == "Win32" then
|
||||
settings.cc.defines:Add("SPECTRE_PLATFORM_WIN=1")
|
||||
elseif TARGET_OS == "Unix" then
|
||||
settings.cc.defines:Add("SPECTRE_PLATFORM_UNIX=1")
|
||||
end
|
||||
|
||||
-- FreeType2
|
||||
settings.cc.includes:Add("vendor/FreeType2/include")
|
||||
if TARGET_OS == "Win32" then
|
||||
settings.cc.includes:Add("vendor/FreeType2/include")
|
||||
|
||||
-- Staticly link freetype on windows.
|
||||
settings.link.libpath:Add("vendor/FreeType2/lib/x86")
|
||||
else
|
||||
settings.cc.includes:Add("/usr/include/freetype2")
|
||||
end
|
||||
|
||||
-- STB
|
||||
settings.cc.includes:Add("vendor/stb/include")
|
||||
|
|
@ -39,25 +53,40 @@ local system_module = Module("source/System", {
|
|||
})
|
||||
|
||||
local platform_common_module = Module("source/Platform", {
|
||||
"PlatformApplication.cpp",
|
||||
"PlatformDisplay.cpp"
|
||||
})
|
||||
|
||||
|
||||
-- if TARGET_OS == "Win32" then -- Needed later for unix.
|
||||
local platform_spec_module = Module("source/Platform/Win32", {
|
||||
"Win32Application.cpp",
|
||||
"Win32Display.cpp",
|
||||
"Win32GLContext.cpp",
|
||||
"Win32Input.cpp",
|
||||
"Win32Internal.cpp",
|
||||
"Win32Keyboard.cpp",
|
||||
"Win32Misc.cpp",
|
||||
"Win32Mouse.cpp",
|
||||
"Win32EventQueue.cpp",
|
||||
"Win32System.cpp",
|
||||
"glad_wgl.c"
|
||||
})
|
||||
--end
|
||||
if TARGET_OS == "Win32" then
|
||||
platform_spec_module = Module("source/Platform/Win32", {
|
||||
"Win32Application.cpp",
|
||||
"Win32Display.cpp",
|
||||
"Win32GLContext.cpp",
|
||||
"Win32Input.cpp",
|
||||
"Win32Internal.cpp",
|
||||
"Win32Keyboard.cpp",
|
||||
"Win32Misc.cpp",
|
||||
"Win32Mouse.cpp",
|
||||
"Win32EventQueue.cpp",
|
||||
"Win32System.cpp",
|
||||
"glad_wgl.c"
|
||||
})
|
||||
elseif TARGET_OS == "Unix" then
|
||||
platform_spec_module = Module("source/Platform/Unix", {
|
||||
"Xlib.cpp",
|
||||
"UnixApplication.cpp",
|
||||
"X11Display.cpp",
|
||||
"GLXContext.cpp",
|
||||
"X11Input.cpp",
|
||||
"X11Keyboard.cpp",
|
||||
"X11Mouse.cpp",
|
||||
"X11EventQueue.cpp",
|
||||
"X11WindowEventHandler.cpp",
|
||||
"UnixMisc.cpp",
|
||||
"UnixSystem.cpp",
|
||||
"glad_glx.c"
|
||||
})
|
||||
end
|
||||
|
||||
local input_module = Module("source/Input", {
|
||||
"InputDevice.cpp",
|
||||
|
|
@ -134,7 +163,9 @@ local scene_module = Module("source/Scene", {
|
|||
-----------------------------------------------------------
|
||||
|
||||
-- Dependancies
|
||||
Import("vendor/FreeType2/build.lua")
|
||||
if TARGET_OS == "Win32" then
|
||||
Import("vendor/FreeType2/build.lua")
|
||||
end
|
||||
|
||||
-- engine
|
||||
local obj = Compile(settings, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue