WIP: Switching from Premake to CMake build system
This commit is contained in:
17
Editor/CMakeLists.txt
Normal file
17
Editor/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
file(GLOB SOURCE_FILES "src/*.cpp")
|
||||
file(GLOB HEADER_FILES "src/*.h")
|
||||
add_executable(Editor ${SOURCE_FILES} "../libs/glad/src/glad.c" ${HEADER_FILES})
|
||||
|
||||
target_include_directories(Editor PRIVATE
|
||||
"../YoggieEngine/src"
|
||||
"../libs/guizmo"
|
||||
)
|
||||
target_link_directories(Editor PRIVATE
|
||||
"../libs/ImGui/build/Release"
|
||||
"../libs/guizmo/build/Release" )
|
||||
target_link_libraries(Editor
|
||||
thirdparty_tools
|
||||
YoggieEngine
|
||||
ImGui
|
||||
ImGuizmo
|
||||
)
|
@ -1,51 +0,0 @@
|
||||
project "Editor"
|
||||
kind "ConsoleApp"
|
||||
|
||||
buildmessage "Building editor ..."
|
||||
|
||||
links{
|
||||
"YoggieEngine",
|
||||
"ImGuizmo",
|
||||
"nfd"
|
||||
}
|
||||
|
||||
|
||||
|
||||
targetdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}"
|
||||
objdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
|
||||
|
||||
includedirs{
|
||||
|
||||
"../YoggieEngine/build/Debug",
|
||||
|
||||
-- I'd prefer if didn't need these..
|
||||
-- We'll figure that out some time later
|
||||
"../libs/physx/physx/include",
|
||||
"../libs/physx/pxshared/include",
|
||||
incfolder["lua"],
|
||||
incfolder["spdlog"],
|
||||
incfolder["glm"],
|
||||
incfolder["assimp"],
|
||||
incfolder["glad"],
|
||||
incfolder["glfw"],
|
||||
|
||||
incfolder["imgui"],
|
||||
incfolder["imguizmo"],
|
||||
incfolder["entt"],
|
||||
incfolder["yamlcpp"],
|
||||
incfolder["nativefiledialog"],
|
||||
incfolder["mINI"]
|
||||
|
||||
|
||||
}
|
||||
|
||||
libdirs {
|
||||
staticlib["yoggie"],
|
||||
staticlib["nativefiledialog"]
|
||||
}
|
||||
|
||||
files {
|
||||
"../libs/glad/src/glad.c",
|
||||
"./src/**.h",
|
||||
"./src/**.cpp"
|
||||
}
|
@ -1,27 +1,17 @@
|
||||
#include "../../YoggieEngine/src/EntryPoint.h"
|
||||
#include <stack>
|
||||
#include "EditorLayer.h"
|
||||
|
||||
#include "EntryPoint.h"
|
||||
#include <stack>
|
||||
|
||||
using namespace YoggieEngine;
|
||||
|
||||
class Editor : public Application {
|
||||
public:
|
||||
Editor() : Application("Editor"){}
|
||||
|
||||
void Run() override
|
||||
{
|
||||
PushLayer(new EditorLayer());
|
||||
Application::Run();
|
||||
|
||||
}
|
||||
Editor() : Application("Editor") {}
|
||||
|
||||
void Run() override {
|
||||
PushLayer(new EditorLayer());
|
||||
Application::Run();
|
||||
}
|
||||
};
|
||||
|
||||
YoggieEngine::Application* CreateApplication() {
|
||||
|
||||
return new Editor();
|
||||
|
||||
}
|
||||
|
||||
|
||||
YoggieEngine::Application *CreateApplication() { return new Editor(); }
|
||||
|
Reference in New Issue
Block a user