Added premake5

This commit is contained in:
Light3039 2021-05-20 11:49:24 +04:30
parent 5f457aa8d1
commit 8ee8377c25
13 changed files with 146 additions and 40 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ bin-int/
# VS Files
**.vcxproj**
**.sln

27
BuildScripts/LICENSE.txt Normal file
View file

@ -0,0 +1,27 @@
Copyright (c) 2003-2019 Jason Perkins and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of Premake nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

BIN
BuildScripts/premake5.exe Normal file

Binary file not shown.

19
BuildScripts/premake5.lua Normal file
View file

@ -0,0 +1,19 @@
workspace "Light"
location "../"
startproject "Sandbox"
architecture "x64"
configurations
{
"Debug",
"Release",
"Distribution",
}
-- Directories --
outputdir = "%{cfg.buildcfg}/%{cfg.system}/%{cfg.architecture}/%{prj.name}"
-- Projects --
include "../Sandbox/"
include "../Engine/"

45
Engine/premake5.lua Normal file
View file

@ -0,0 +1,45 @@
project "Engine"
-- Output Directories --
location "../Engine/"
targetdir ("../bin/" .. outputdir)
objdir ("../bin-int/" .. outputdir)
-- Compiler --
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "on"
-- Project Files ---
files
{
"%{prj.location}/**.h",
"%{prj.location}/**.cpp",
"%{prj.location}/**.lua",
}
-- Dependencies --
-- NILL --
--- Filters ---
-- windows
filter "system:windows"
defines "LT_PLATFORM_WINDOWS"
systemversion "latest"
-- debug
filter "configurations:Debug"
defines "LT_DEBUG"
symbols "on"
-- release
filter "configurations:Release"
defines "LT_RELEASE"
optimize "on"
-- distribution
filter "configurations:Distribution"
defines "LT_DIST"
optimize "on"

View file

@ -1,34 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30330.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Light Engine", "Light Engine\Light Engine.vcxproj", "{039B5335-8EC7-4005-AFF9-833E1B760755}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sandbox", "Sandbox\Sandbox.vcxproj", "{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}"
ProjectSection(ProjectDependencies) = postProject
{039B5335-8EC7-4005-AFF9-833E1B760755} = {039B5335-8EC7-4005-AFF9-833E1B760755}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{039B5335-8EC7-4005-AFF9-833E1B760755}.Debug|x64.ActiveCfg = Debug|x64
{039B5335-8EC7-4005-AFF9-833E1B760755}.Debug|x64.Build.0 = Debug|x64
{039B5335-8EC7-4005-AFF9-833E1B760755}.Release|x64.ActiveCfg = Release|x64
{039B5335-8EC7-4005-AFF9-833E1B760755}.Release|x64.Build.0 = Release|x64
{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}.Debug|x64.ActiveCfg = Debug|x64
{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}.Debug|x64.Build.0 = Debug|x64
{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}.Release|x64.ActiveCfg = Release|x64
{A72B03C9-4FE6-4288-AE22-8DD8E4E37A4D}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ADE7ECA1-8548-4C9C-90A7-F56634490371}
EndGlobalSection
EndGlobal

53
Sandbox/premake5.lua Normal file
View file

@ -0,0 +1,53 @@
project "Sandbox"
-- Output Directories --
location "../Sandbox/"
targetdir ("../bin/" .. outputdir)
objdir ("../bin-int/" .. outputdir)
-- Compiler --
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
-- Project Files ---
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.cpp",
"%{prj.location}/**.lua",
}
-- Dependencies --
includedirs
{
"%{wks.location}/Engine/src",
}
links
{
"Engine",
}
--- Filters ---
-- windows
filter "system:windows"
defines "LT_PLATFORM_WINDOWS"
systemversion "latest"
-- debug
filter "configurations:Debug"
defines "LT_DEBUG"
symbols "on"
-- release
filter "configurations:Release"
defines "LT_RELEASE"
optimize "on"
-- distribution
filter "configurations:Distribution"
defines "LT_DIST"
optimize "on"

View file

@ -2,11 +2,6 @@
class Sandbox : public Light::Application
{
public:
Sandbox()
{
}
};
Light::Application* Light::CreateApplication()