Adding / organizing the workspace into multple seperate projects
This commit is contained in:
		
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -1,12 +1,11 @@
 | 
			
		||||
build/
 | 
			
		||||
intermediates/
 | 
			
		||||
**/build/
 | 
			
		||||
**/intermediates/
 | 
			
		||||
tools/
 | 
			
		||||
*.make
 | 
			
		||||
Makefile
 | 
			
		||||
.vscode/
 | 
			
		||||
libs/lua
 | 
			
		||||
libs/glad
 | 
			
		||||
Debug/
 | 
			
		||||
*.sln
 | 
			
		||||
*.vcxproj
 | 
			
		||||
*.vcxproj.filters
 | 
			
		||||
 | 
			
		||||
@ -34,7 +34,7 @@ project "BarinkEngine"
 | 
			
		||||
    "assimp-vc143-mtd",
 | 
			
		||||
    "glfw3",
 | 
			
		||||
 | 
			
		||||
    "ImGUI_Opengl3",
 | 
			
		||||
    "ImGui",
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -55,26 +55,9 @@ project "BarinkEngine"
 | 
			
		||||
    "./src/**/*.h"
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  filter { "system:windows"}
 | 
			
		||||
    prebuildcommands {
 | 
			
		||||
      -- Copy shaders 
 | 
			
		||||
      "copy src\\graphics\\shaders\\fragment.shader            ..\\build\\SandboxApplication\\Debug\\test.fs", 
 | 
			
		||||
      "copy src\\graphics\\shaders\\vertex.shader              ..\\build\\SandboxApplication\\Debug\\test.vs",
 | 
			
		||||
      "copy src\\graphics\\shaders\\RenderSurfaceFrag.shader   ..\\build\\SandboxApplication\\Debug\\RenderSurface.fs",
 | 
			
		||||
      "copy src\\graphics\\shaders\\RenderSurfaceVert.shader   ..\\build\\SandboxApplication\\Debug\\RenderSurface.vs" 
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
  filter { "system:linux" }
 | 
			
		||||
    prebuildcommands {
 | 
			
		||||
      -- Copy shaders
 | 
			
		||||
      "cp src/graphics/shaders/fragment.shader ../build/SandboxApplication/Debug/test.fs", 
 | 
			
		||||
      "cp src/graphics/shaders/vertex.shader ../build/SandboxApplication/Debug/test.vs",
 | 
			
		||||
      "cp src/graphics/shaders/RenderSurfaceFrag.shader ../build/SandboxApplication/Debug/RenderSurface.fs",
 | 
			
		||||
      "cp src/graphics/shaders/RenderSurfaceVert.shader ../build/SandboxApplication/Debug/RenderSurface.vs" 
 | 
			
		||||
  prebuildcommands 
 | 
			
		||||
  {
 | 
			
		||||
    ok,err = os.copyfile("BarinkEngine/src/Graphics/shaders/*" ,"SandboxApp/build/Debug/")
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
include('../ImGui')
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
project "SandboxApplication"
 | 
			
		||||
project "Editor"
 | 
			
		||||
kind "ConsoleApp"
 | 
			
		||||
 | 
			
		||||
buildmessage "Building Sandbox ..."
 | 
			
		||||
buildmessage "Building editor ..."
 | 
			
		||||
 | 
			
		||||
links{
 | 
			
		||||
  "BarinkEngine"
 | 
			
		||||
							
								
								
									
										8
									
								
								Editor/src/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Editor/src/main.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main() 
 | 
			
		||||
{
 | 
			
		||||
	std::cout << "Welcome to the Editor!" << std::endl;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
project "ImGUI_Opengl3"
 | 
			
		||||
project "ImGui"
 | 
			
		||||
  kind "StaticLib"
 | 
			
		||||
 | 
			
		||||
  includedirs {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										39
									
								
								Runtime/premake5.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								Runtime/premake5.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,39 @@
 | 
			
		||||
project "Runtime"
 | 
			
		||||
kind "ConsoleApp"
 | 
			
		||||
 | 
			
		||||
buildmessage "Building the runtime ..."
 | 
			
		||||
 | 
			
		||||
links{
 | 
			
		||||
  "BarinkEngine"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
includedirs{
 | 
			
		||||
  "./../BarinkEngine/src",
 | 
			
		||||
  -- I'd prefer if didn't need these..
 | 
			
		||||
  -- We'll figure that out some time later
 | 
			
		||||
  "./../libs/lua/include",
 | 
			
		||||
  "./../libs/spdlog/include",
 | 
			
		||||
  "./../libs/glm",
 | 
			
		||||
  "./../libs/GorillaAudio/include",
 | 
			
		||||
 | 
			
		||||
  "./../libs/assimp/include",
 | 
			
		||||
  "./../libs/glad/include",
 | 
			
		||||
  "./../libs/glfw/include",
 | 
			
		||||
  "./../libs/tinygltf",
 | 
			
		||||
  "./../libs/glew/include",
 | 
			
		||||
  "./../libs/glm",
 | 
			
		||||
  "./../libs/ImGui",
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  "./include"
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
libdirs {
 | 
			
		||||
  './../build/BarinkEngine/Debug'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
files { 
 | 
			
		||||
  "./src/*.h",
 | 
			
		||||
  "./src/*.cpp"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								Runtime/src/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Runtime/src/main.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
 | 
			
		||||
int main()
 | 
			
		||||
{
 | 
			
		||||
	std::cout << "Welcome to the runtime!" << std::endl;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								SandboxApp/premake5.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								SandboxApp/premake5.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,40 @@
 | 
			
		||||
project "SandboxApp"
 | 
			
		||||
kind "ConsoleApp"
 | 
			
		||||
 | 
			
		||||
buildmessage "Building SandboxApp ..."
 | 
			
		||||
 | 
			
		||||
links{
 | 
			
		||||
  "BarinkEngine"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
includedirs{
 | 
			
		||||
  "./../BarinkEngine/Include",
 | 
			
		||||
 | 
			
		||||
  -- I'd prefer if didn't need these..
 | 
			
		||||
  -- We'll figure that out some time later
 | 
			
		||||
  "./../libs/lua/include",
 | 
			
		||||
  "./../libs/spdlog/include",
 | 
			
		||||
  "./../libs/glm",
 | 
			
		||||
  "./../libs/GorillaAudio/include",
 | 
			
		||||
 | 
			
		||||
  "./../libs/assimp/include",
 | 
			
		||||
  "./../libs/glad/include",
 | 
			
		||||
  "./../libs/glfw/include",
 | 
			
		||||
  "./../libs/tinygltf",
 | 
			
		||||
  "./../libs/glew/include",
 | 
			
		||||
  "./../libs/glm",
 | 
			
		||||
  "./../libs/ImGui",
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  "./include"
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
libdirs {
 | 
			
		||||
  './../build/BarinkEngine/Debug'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
files { 
 | 
			
		||||
  "./include/*.h",
 | 
			
		||||
  "./src/*.cpp"
 | 
			
		||||
}
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
#include "../../BarinkEngine/src/Scene/SceneNodeTypes.h"
 | 
			
		||||
#include "../../BarinkEngine/src/AssetManager/ModelImporter.h"
 | 
			
		||||
#include "../../BarinkEngine/src/Graphics/Framebuffer.h"
 | 
			
		||||
#include "imgui.h"
 | 
			
		||||
#include <imgui.h>
 | 
			
		||||
#include "GUI.h"
 | 
			
		||||
#include "Util.h"
 | 
			
		||||
 | 
			
		||||
@ -14,8 +14,8 @@ Shader* shader;
 | 
			
		||||
 | 
			
		||||
char* code = new char[254];
 | 
			
		||||
 | 
			
		||||
const std::string vertexShaderSource = "../build/SandboxApplication/Debug/test.vs";
 | 
			
		||||
const std::string fragmentShaderSource = "../build/SandboxApplication/Debug/test.fs";
 | 
			
		||||
const std::string vertexShaderSource = "build/Debug/test.vs";
 | 
			
		||||
const std::string fragmentShaderSource = "build/Debug/test.fs";
 | 
			
		||||
 | 
			
		||||
BarinkEngine::ModelImporter* MI = new BarinkEngine::ModelImporter();
 | 
			
		||||
Framebuffer* framebuffer;
 | 
			
		||||
@ -38,7 +38,7 @@ void Start() {
 | 
			
		||||
 | 
			
		||||
    // Create a cube node
 | 
			
		||||
   
 | 
			
		||||
    cube = MI->Import("../build/SandboxApplication/Debug/Models/cube.obj");
 | 
			
		||||
    cube = MI->Import("build/Debug/Models/cube.obj");
 | 
			
		||||
    cube->renderable->material = new Material(*shader);
 | 
			
		||||
    cube->renderable->material->Color = glm::vec3(1.0f, 0.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								premake5.lua
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								premake5.lua
									
									
									
									
									
								
							@ -3,12 +3,13 @@ workspace "BarinkEngine"
 | 
			
		||||
 | 
			
		||||
	language "C++"
 | 
			
		||||
	cppdialect "C++17"
 | 
			
		||||
 | 
			
		||||
	targetdir "./build/%{prj.name}/%{cfg.buildcfg}"
 | 
			
		||||
	objdir "./intermediates/%{prj.name}/%{cfg.buildcfg}"
 | 
			
		||||
 | 
			
		||||
	architecture "x86_64"
 | 
			
		||||
 | 
			
		||||
	targetdir "./%{prj.name}/build/%{cfg.buildcfg}"
 | 
			
		||||
	objdir "./%{prj.name}/intermediates/%{cfg.buildcfg}"
 | 
			
		||||
	
 | 
			
		||||
	startproject("SandboxApp")
 | 
			
		||||
 | 
			
		||||
	filter "configurations:Debug"
 | 
			
		||||
			defines {"DEBUG"}
 | 
			
		||||
			symbols "On"
 | 
			
		||||
@ -17,6 +18,8 @@ workspace "BarinkEngine"
 | 
			
		||||
		defines {"NDEBUG"}
 | 
			
		||||
		optimize "On"
 | 
			
		||||
 | 
			
		||||
include("./SandboxApplication")
 | 
			
		||||
		
 | 
			
		||||
include("./BarinkEngine")
 | 
			
		||||
include("./Runtime") 
 | 
			
		||||
include ("./Editor")
 | 
			
		||||
include("./SandboxApp")
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user