light/Engine/build.lua

118 lines
2.2 KiB
Lua
Raw Normal View History

2021-05-20 11:49:24 +04:30
project "Engine"
-- Output Directories --
2021-05-21 15:00:29 +04:30
location "%{wks.location}/Engine/"
2021-05-20 11:49:24 +04:30
2021-05-21 15:00:29 +04:30
targetdir ("%{wks.location}/bin/" .. outputdir)
objdir ("%{wks.location}/bin-int/" .. outputdir)
2021-05-20 11:49:24 +04:30
-- Compiler --
-- kind
2021-05-20 11:49:24 +04:30
kind "StaticLib"
-- language
2021-05-20 11:49:24 +04:30
language "C++"
cppdialect "C++17"
-- pch
2021-05-26 16:28:37 +04:30
pchsource "src/Engine/ltpch.cpp"
pchheader "ltpch.h"
2021-05-20 11:49:24 +04:30
-- Project Files ---
files
{
-- src
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.cpp",
-- premake
"%{prj.location}/build.lua",
"%{prj.location}/dxgidebug.dll", -- :#todo
"%{prj.location}/res/**"
2021-05-20 11:49:24 +04:30
}
-- Dependencies --
2021-05-21 10:55:39 +04:30
includedirs
{
-- engine
"%{prj.location}" ,
"%{prj.location}/src" ,
"%{prj.location}/src/Engine" ,
"%{prj.location}/src/Platform/GraphicsAPI" ,
"%{prj.location}/src/Platform/OS" ,
2021-05-21 10:55:39 +04:30
2021-05-25 18:35:52 +04:30
-- 3rd party
2021-05-21 10:55:39 +04:30
(dependenciesdir .. "spdlog/include/"),
(dependenciesdir .. "GLFW/include/"),
(dependenciesdir .. "GLAD/include"),
(dependenciesdir .. "imgui/backends"),
(dependenciesdir .. "imgui/"),
(dependenciesdir .. "stb_image/"),
(dependenciesdir .. "glm/"),
2021-05-21 10:55:39 +04:30
}
2021-05-21 15:00:29 +04:30
links
{
"GLFW" ,
"GLAD" ,
"ImGui" ,
2021-05-21 15:00:29 +04:30
}
2021-05-20 11:49:24 +04:30
--- Filters ---
-- windows
filter "system:windows"
2021-05-27 18:55:30 +04:30
defines "LIGHT_PLATFORM_WINDOWS"
2021-05-20 11:49:24 +04:30
systemversion "latest"
staticruntime "on"
2021-06-02 09:07:45 +04:30
links
{
"d3d11.lib" ,
"dxguid.lib" ,
"D3DCompiler.lib" ,
}
flags { "MultiProcessorCompile" }
2021-06-26 13:09:11 +04:30
filter { "system:windows", "files:src/Platform/OS/Linux/**.**" }
flags { "ExcludeFromBuild" }
2021-06-26 13:09:11 +04:30
-- linux
filter "system:linux"
defines "LIGHT_PLATFORM_LINUX"
links
{
"dl",
}
buildoptions
{
"-lgtest",
"-lpthread",
}
filter { "system:linux", "files:src/Platform/GraphicsAPI/DirectX/**.**" }
flags { "ExcludeFromBuild" }
filter { "system:linux", "files:src/Platform/OS/Windows/**.**" }
flags "ExcludeFromBuild"
2021-05-20 11:49:24 +04:30
-- debug
filter "configurations:Debug"
2021-06-15 09:39:11 +04:30
defines "LIGHT_DEBUG"
2021-05-20 11:49:24 +04:30
symbols "on"
-- release
filter "configurations:Release"
2021-06-15 09:39:11 +04:30
defines "LIGHT_RELEASE"
2021-05-20 11:49:24 +04:30
optimize "on"
-- distribution
filter "configurations:Distribution"
2021-06-15 09:39:11 +04:30
defines "LIGHT_DIST"
optimize "on"
filter { "files:**.hlsl" }
flags "ExcludeFromBuild"
shadermodel "4.0"