Reorganising the game engine structure. Getting things ready for real development of the engine
This commit is contained in:
109
premake5.lua
109
premake5.lua
@ -1,104 +1,43 @@
|
||||
workspace "BarinkEngine"
|
||||
configurations { "Debug", "Test", "Release" }
|
||||
|
||||
language "C++"
|
||||
cppdialect "C++17"
|
||||
|
||||
targetdir "./build/%{prj.name}/%{cfg.buildcfg}"
|
||||
objdir "./intermediates/%{prj.name}/%{cfg.buildcfg}"
|
||||
|
||||
architecture "x86_64"
|
||||
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines {"DEBUG"}
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines {"NDEBUG"}
|
||||
optimize "On"
|
||||
|
||||
|
||||
project "SandboxApplication"
|
||||
kind "ConsoleApp"
|
||||
|
||||
buildmessage "Building BarinkEngineSandbox ..."
|
||||
|
||||
includedirs {
|
||||
"./libs/assimp/include",
|
||||
"./libs/glad/include",
|
||||
"./MyGraphicsEngine",
|
||||
"./MyGraphicsEngine/include",
|
||||
"./libs/spdlog/include",
|
||||
"./libs/glm",
|
||||
"./libs/GorillaAudio/include",
|
||||
"./libs/lua/include",
|
||||
"./libs/glfw/include",
|
||||
"./libs/ImGui",
|
||||
"./libs/lua/include"
|
||||
|
||||
}
|
||||
|
||||
libdirs{
|
||||
"./libs/spdlog/build/Release",
|
||||
"./libs/glfw/build/src/Debug",
|
||||
"./libs/lua",
|
||||
"./libs/ImGui"
|
||||
}
|
||||
buildmessage "Building Sandbox ..."
|
||||
|
||||
links{
|
||||
"lua54",
|
||||
"spdlog",
|
||||
"glfw3",
|
||||
"MyGraphicsEngine"
|
||||
"BarinkEngine"
|
||||
}
|
||||
|
||||
includedirs{
|
||||
"./BarinkEngine/include"
|
||||
}
|
||||
|
||||
files {
|
||||
"./libs/ImGui/*.cpp",
|
||||
"./libs/ImGui/backends/imgui_impl_glfw.cpp",
|
||||
"./libs/ImGui/backends/imgui_impl_Opengl3.cpp",
|
||||
"SandboxApplication/*.cpp"
|
||||
"./SandboxApplication/*.h",
|
||||
"./SandboxApplication/*.cpp"
|
||||
}
|
||||
|
||||
defines {"DEBUG"}
|
||||
|
||||
symbols "On"
|
||||
|
||||
-- NOTE: make these copy instructions more flexible
|
||||
ok, err = os.copyfile("MyGraphicsEngine/shaders/fragment.shader", "build/SandboxApplication/Debug/test.fs")
|
||||
if err then error("Copy fragment shader source failed!") end
|
||||
|
||||
ok, err = os.copyfile("MyGraphicsEngine/shaders/vertex.shader", "build/SandboxApplication/Debug/test.vs")
|
||||
if err then error("Copy vertex shader source failed!") end
|
||||
|
||||
|
||||
project "MyGraphicsEngine"
|
||||
kind "StaticLib"
|
||||
|
||||
buildmessage "Building MyGraphicsEngine ..."
|
||||
|
||||
includedirs {
|
||||
"./libs/assimp/include",
|
||||
"./libs/glad/include",
|
||||
"./libs/glfw/include",
|
||||
"./libs/tinygltf",
|
||||
"./libs/glew/include",
|
||||
"./libs/spdlog/include",
|
||||
"./libs/glm",
|
||||
"./MyGraphicsEngine/include"
|
||||
}
|
||||
|
||||
|
||||
libdirs{
|
||||
"./libs/spdlog/build/Release",
|
||||
"./libs/assimp/lib/Debug",
|
||||
"./libs/glfw/build/src/Debug"
|
||||
}
|
||||
|
||||
links {
|
||||
"spdlog",
|
||||
"assimp-vc143-mtd",
|
||||
"glfw3"
|
||||
}
|
||||
|
||||
files {
|
||||
"./libs/glad/src/glad.c",
|
||||
"./MyGraphicsEngine/**/*.*" ,
|
||||
"./MyGraphicsEngine/*.*"
|
||||
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines {"DEBUG"}
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines {"NDEBUG"}
|
||||
optimize "On"
|
||||
include("./BarinkEngine")
|
||||
|
||||
include("./MyGraphicsEngine")
|
Reference in New Issue
Block a user