refactor: turn engine module to app module
This commit is contained in:
parent
5e310b87e3
commit
eab0799537
18 changed files with 45 additions and 60 deletions
1
external/CMakeLists.txt
vendored
1
external/CMakeLists.txt
vendored
|
@ -5,7 +5,6 @@ add_subdirectory(./glad)
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
set(MIRROR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../modules/mirror/)
|
||||
set(ENGINE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../modules/engine/)
|
||||
set(DEPENDENCIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# engine
|
||||
add_subdirectory(./base)
|
||||
add_subdirectory(./time)
|
||||
add_subdirectory(./logger)
|
||||
|
@ -14,7 +15,9 @@ add_subdirectory(./ui)
|
|||
add_subdirectory(./window)
|
||||
add_subdirectory(./renderer)
|
||||
add_subdirectory(./ecs)
|
||||
add_subdirectory(./engine)
|
||||
|
||||
add_subdirectory(./app)
|
||||
|
||||
# apps
|
||||
add_subdirectory(./mirror)
|
||||
|
||||
|
|
21
modules/app/CMakeLists.txt
Normal file
21
modules/app/CMakeLists.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
add_library_module(app
|
||||
application.cpp
|
||||
layer.cpp
|
||||
layer_stack.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(app
|
||||
PUBLIC
|
||||
renderer
|
||||
logger
|
||||
ui
|
||||
asset_parser
|
||||
asset_manager
|
||||
lt_debug
|
||||
ecs
|
||||
window
|
||||
glad
|
||||
time
|
||||
opengl::opengl
|
||||
EnTT::EnTT
|
||||
)
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <engine/engine.hpp>
|
||||
#include <app/application.hpp>
|
||||
|
||||
int main(int argc, char *argv[]) // NOLINT
|
||||
try
|
|
@ -1,12 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
|
||||
namespace lt {
|
||||
|
||||
class Event;
|
||||
|
||||
// mouse
|
||||
class MouseMovedEvent;
|
||||
class ButtonPressedEvent;
|
||||
class ButtonReleasedEvent;
|
||||
|
@ -36,6 +33,7 @@ public:
|
|||
virtual void on_update(float deltaTime)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void on_user_interface_update()
|
||||
{
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
#include <app/application.hpp>
|
||||
#include <app/layer.hpp>
|
||||
#include <app/layer_stack.hpp>
|
||||
#include <asset_manager/asset_manager.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <engine/core/application.hpp>
|
||||
#include <engine/layer/layer.hpp>
|
||||
#include <engine/layer/layer_stack.hpp>
|
||||
#include <input/events/event.hpp>
|
||||
#include <input/events/keyboard.hpp>
|
||||
#include <input/events/window.hpp>
|
|
@ -1,4 +1,4 @@
|
|||
#include <engine/layer/layer.hpp>
|
||||
#include <app/layer.hpp>
|
||||
#include <input/events/char.hpp>
|
||||
#include <input/events/event.hpp>
|
||||
#include <input/events/keyboard.hpp>
|
|
@ -1,5 +1,5 @@
|
|||
#include <engine/layer/layer.hpp>
|
||||
#include <engine/layer/layer_stack.hpp>
|
||||
#include <app/layer.hpp>
|
||||
#include <app/layer_stack.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
if(NOT WIN32)
|
||||
add_library_module(engine
|
||||
core/application.cpp
|
||||
layer/layer.cpp
|
||||
layer/layer_stack.cpp
|
||||
)
|
||||
else()
|
||||
add_library_module(engine
|
||||
core/application.cpp
|
||||
layer/layer.cpp
|
||||
layer/layer_stack.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(engine
|
||||
PUBLIC
|
||||
renderer
|
||||
logger
|
||||
ui
|
||||
asset_parser
|
||||
asset_manager
|
||||
lt_debug
|
||||
ecs
|
||||
window
|
||||
glad
|
||||
time
|
||||
opengl::opengl
|
||||
EnTT::EnTT
|
||||
)
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <engine/core/application.hpp>
|
||||
#include <engine/layer/layer.hpp>
|
||||
#include <engine/layer/layer_stack.hpp>
|
||||
#include <logger/logger.hpp>
|
||||
#include <renderer/framebuffer.hpp>
|
||||
#include <renderer/graphics_context.hpp>
|
||||
#include <renderer/renderer.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
|
||||
#ifdef LIGHT_ENTRY_POINT
|
||||
#include <engine/core/entrypoint.hpp>
|
||||
#endif
|
|
@ -8,7 +8,7 @@ add_executable_module(mirror
|
|||
|
||||
target_link_libraries(
|
||||
mirror
|
||||
PUBLIC engine
|
||||
PUBLIC app
|
||||
PUBLIC opengl::opengl
|
||||
PUBLIC ui
|
||||
PUBLIC imgui
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <engine/engine.hpp>
|
||||
#include <app/layer.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <imgui.h>
|
||||
#include <mirror/panel/asset_browser.hpp>
|
||||
#include <mirror/panel/properties.hpp>
|
||||
#include <mirror/panel/scene_hierarchy.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <engine/engine.hpp>
|
||||
#include <filesystem>
|
||||
#include <mirror/panel/panel.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <app/application.hpp>
|
||||
#include <asset_manager/asset_manager.hpp>
|
||||
#include <camera/component.hpp>
|
||||
#include <ecs/components.hpp>
|
||||
|
@ -6,6 +7,9 @@
|
|||
#include <input/input.hpp>
|
||||
#include <input/key_codes.hpp>
|
||||
#include <mirror/editor_layer.hpp>
|
||||
#include <renderer/framebuffer.hpp>
|
||||
#include <renderer/graphics_context.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
#include <ui/ui.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
#include <window/window.hpp>
|
||||
|
||||
//
|
||||
#include <engine/engine.hpp>
|
||||
#include <app/application.hpp>
|
||||
#include <app/entrypoint.hpp>
|
||||
#include <app/layer_stack.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include <asset_manager/asset_manager.hpp>
|
||||
#include <ecs/scene.hpp>
|
||||
#include <ecs/serializer.hpp>
|
||||
#include <engine/engine.hpp>
|
||||
#include <imgui.h>
|
||||
#include <mirror/panel/asset_browser.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
|
||||
namespace lt {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue