Compare commits

..

3 Commits

10 changed files with 78 additions and 109 deletions

View File

@ -1,18 +0,0 @@
project "ImGui"
kind "StaticLib"
includedirs {
"../libs/glfw/include",
"../libs/ImGui"
}
files {
"../libs/ImGui/*.cpp",
"../libs/ImGui/backends/imgui_impl_glfw.cpp",
"../libs/ImGui/backends/imgui_impl_Opengl3.cpp",
}
libdirs{
"../libs/ImGui",
"../libs/glad"
}

View File

@ -1,19 +0,0 @@
project "ImGuizmo"
kind "StaticLib"
includedirs {
"../libs/glfw/include",
"../libs/ImGui",
"../libs/guizmo"
}
files {
"../libs/guizmo/*.cpp",
}
libdirs{
"../libs/ImGui",
"../libs/glad"
}
include("../ImGui")

View File

@ -1,39 +0,0 @@
project "Runtime"
kind "ConsoleApp"
buildmessage "Building the runtime ..."
links{
"YoggieEngine"
}
includedirs{
"./../YoggieEngine/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 {
'./../YoggieEngine/build/Debug'
}
files {
"./src/*.h",
"./src/*.cpp"
}

View File

@ -1,6 +0,0 @@
#include <iostream>
int main()
{
std::cout << "Welcome to the runtime!" << std::endl;
}

33
Tests/EngineTest.cpp Normal file
View File

@ -0,0 +1,33 @@
#include <YoggieEngine.h>
#include <gtest/gtest.h>
TEST(HelloTDD, MyFirstTest) {
EXPECT_EQ(1, 1);
};
TEST(TRANSFORM_COMPONENT_TESTS , CAN_EXTRACT_TRANSLATION_FROM_TRANSFORM_MATRIX) {
auto component = YoggieEngine::TransformComponent{};
component.Position = glm::vec3(1.0f, 2.0f, 3.0f);
auto transformationMatrix = component.GetTransform();
auto newComponent = YoggieEngine::TransformComponent{};
newComponent.Decompose(transformationMatrix);
EXPECT_EQ(newComponent.Position.x, component.Position.x);
EXPECT_EQ(newComponent.Position.y, component.Position.y);
EXPECT_EQ(newComponent.Position.z, component.Position.z);
}
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

32
Tests/premake5.lua Normal file
View File

@ -0,0 +1,32 @@
project "EngineTests"
kind "ConsoleApp"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
files{"**.h", "**.cpp"}
includedirs{
"../YoggieEngine/src",
incfolder["lua"],
incfolder["spdlog"],
incfolder["glm"],
incfolder["glad"],
incfolder["glfw"],
incfolder["imgui"],
incfolder["imguizmo"],
incfolder["entt"],
"../libs/physx/physx/include",
"../libs/physx/pxshared/include",
incfolder["GoogleTest"]
}
libdirs {
staticlib["yoggie"],
staticlib["GoogleTest"]
}
links{
"YoggieEngine",
"gtest"
}

View File

@ -38,6 +38,7 @@ project "YoggieEngine"
"../libs/steam-audio/include",
"../libs/ImGui",
}
links {
@ -65,8 +66,7 @@ project "YoggieEngine"
"../libs/spdlog/build/Release",
"../libs/assimp/lib/Debug",
"../libs/glfw/build/src/Debug",
"../libs/physx/physx/bin/win.x86_64.vc142.md/debug"
"../libs/physx/physx/bin/win.x86_64.vc142.md/debug",
}
files {

View File

@ -7,6 +7,8 @@ incfolder["glm"] = "%{wks.location}/libs/glm"
incfolder["entt"] = "%{wks.location}/libs/entt/src"
incfolder["yamlcpp"] = "%{wks.location}/libs/yaml-cpp/include"
incfolder["mINI"] = "%{wks.location}/libs/mINI/src"
incfolder["GoogleTest"] = "%{wks.location}/libs/googletest/googletest/include"
-- Graphics
incfolder["glad"] = "%{wks.location}/libs/glad/include"
incfolder["glfw"] = "%{wks.location}/libs/glfw/include"
@ -32,4 +34,4 @@ staticlib = {}
staticlib["yoggie"] = "Yoggie/build/Debug"
staticlib["nativefiledialog"]= "%{wks.location}/libs/nativefiledialog/build/lib/Release/x64"
staticlib["GoogleTest"] = "%{wks.location}/libs/googletest/build/lib/Debug"

View File

@ -2,14 +2,14 @@ include("libraries")
print("Using Premake version ", _PREMAKE_VERSION)
workspace "Yoggie GameEngine"
configurations { "Debug", "Test", "Release" }
configurations { "Debug", "Release" }
language "C++"
cppdialect "C++17"
architecture "x86_64"
targetdir "./%{prj.name}/build/%{cfg.buildcfg}"
objdir "./%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
targetdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}"
objdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
startproject("Editor")
@ -31,17 +31,14 @@ workspace "Yoggie GameEngine"
include("./YoggieEngine")
include ("./Editor")
include ("./Tests")
group("Other")
includeexternal("./SandboxApp")
includeexternal("./Runtime")
include("./SandboxApp")
group("Libraries")
include('ImGui')
include("ImGuizmo")
include("yaml-cpp")
include('libs/ImGui')
include("libs/guizmo")
include("libs/yaml-cpp")

View File

@ -1,13 +0,0 @@
project "yaml-cpp"
kind "StaticLib"
buildmessage "Building YAML parser ..."
includedirs{
"../libs/yaml-cpp/include"
}
files{
"../libs/yaml-cpp/src/*.h",
"../libs/yaml-cpp/src/*.cpp"
}