Adding Editor executable

This commit is contained in:
Dynamitos
2022-09-24 21:06:25 +02:00
parent d7566c5825
commit 05bc31a2b4
24 changed files with 42 additions and 46 deletions
+5 -5
View File
@@ -30,14 +30,14 @@
] ]
}, },
{ {
"name": "Engine Debug", "name": "Editor Debug",
"type": "cppvsdbg", "type": "cppvsdbg",
"request": "launch", "request": "launch",
"program": "${workspaceRoot}/bin/Debug/Engine.exe", "program": "${workspaceRoot}/bin/Debug/Editor.exe",
"args": [], "args": [],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceRoot}/bin/Debug", "cwd": "${workspaceRoot}/bin/Debug",
"console": "integratedTerminal", "console": "internalConsole",
"environment": [], "environment": [],
"symbolSearchPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\lib\\x64", "symbolSearchPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\lib\\x64",
"requireExactSource": false, "requireExactSource": false,
@@ -50,10 +50,10 @@
} }
}, },
{ {
"name": "Engine Release", "name": "Editor Release",
"type": "cppvsdbg", "type": "cppvsdbg",
"request": "launch", "request": "launch",
"program": "${workspaceRoot}/bin/Release/Engine.exe", "program": "${workspaceRoot}/bin/Release/Editor.exe",
"args": [], "args": [],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceRoot}/bin/Release", "cwd": "${workspaceRoot}/bin/Release",
+10 -7
View File
@@ -53,7 +53,8 @@ if(CMAKE_DEBUG_POSTFIX)
add_compile_definitions(ENABLE_VALIDATION) add_compile_definitions(ENABLE_VALIDATION)
add_compile_definitions(SEELE_DEBUG) add_compile_definitions(SEELE_DEBUG)
endif() endif()
add_executable(Engine "") add_library(Engine "")
add_executable(Editor "")
target_compile_definitions(Engine PUBLIC GLFW_WINDOWS) target_compile_definitions(Engine PUBLIC GLFW_WINDOWS)
target_include_directories(Engine PUBLIC src/Engine) target_include_directories(Engine PUBLIC src/Engine)
target_link_libraries(Engine PUBLIC Vulkan::Vulkan) target_link_libraries(Engine PUBLIC Vulkan::Vulkan)
@@ -70,11 +71,11 @@ target_link_libraries(Engine PUBLIC ktx)
target_link_libraries(Engine PUBLIC stb) target_link_libraries(Engine PUBLIC stb)
target_link_libraries(Engine PUBLIC nlohmann_json::nlohmann_json) target_link_libraries(Engine PUBLIC nlohmann_json::nlohmann_json)
if(UNIX) if(UNIX)
target_link_libraries(Engine Threads::Threads) target_link_libraries(Engine Threads::Threads)
target_link_libraries(Engine dl) target_link_libraries(Engine dl)
endif() endif()
target_precompile_headers(Engine target_precompile_headers(Engine
PRIVATE PUBLIC
<assert.h> <assert.h>
<atomic> <atomic>
<condition_variable> <condition_variable>
@@ -91,13 +92,15 @@ target_precompile_headers(Engine
<boost/serialization/serialization.hpp> <boost/serialization/serialization.hpp>
<boost/crc.hpp>) <boost/crc.hpp>)
target_link_libraries(Editor PRIVATE Engine)
add_subdirectory(src/) add_subdirectory(src/)
if(MSVC) if(MSVC)
set(_CRT_SECURE_NO_WARNINGS) set(_CRT_SECURE_NO_WARNINGS)
target_compile_options(Engine PRIVATE -Zi -MP -DEBUG) target_compile_options(Engine PUBLIC -Zi -MP -DEBUG)
else() else()
target_compile_options(Engine PRIVATE -g -Wall -Wextra -Wno-delete-incomplete -pedantic -fcoroutines) target_compile_options(Engine PUBLIC -g -Wall -Wextra -Wno-delete-incomplete -pedantic -fcoroutines)
endif() endif()
add_executable(Seele_unit_tests "") add_executable(Seele_unit_tests "")
@@ -111,5 +114,5 @@ add_custom_target(SeeleEngine ALL
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:nsam,NSAM_BINARY> $<TARGET_FILE_DIR:Engine> COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:nsam,NSAM_BINARY> $<TARGET_FILE_DIR:Engine>
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:nsam,LLVM_BINARY> $<TARGET_FILE_DIR:Engine> COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:nsam,LLVM_BINARY> $<TARGET_FILE_DIR:Engine>
COMMAND_EXPAND_LISTS COMMAND_EXPAND_LISTS
DEPENDS Engine slang-build) DEPENDS Editor slang-build)
-1
View File
@@ -18,7 +18,6 @@ endif()
add_subdirectory(${BOOST_ROOT}) add_subdirectory(${BOOST_ROOT})
#-----------------KTX---------------------------- #-----------------KTX----------------------------
find_program(BASH_EXECUTABLE git-bash)
set(KTX_FEATURE_TESTS off) set(KTX_FEATURE_TESTS off)
add_subdirectory(${KTX_ROOT} ${KTX_ROOT}) add_subdirectory(${KTX_ROOT} ${KTX_ROOT})
+1 -1
+1 -1
View File
@@ -1,2 +1,2 @@
add_subdirectory(Editor/)
add_subdirectory(Engine/) add_subdirectory(Engine/)
+3
View File
@@ -0,0 +1,3 @@
target_sources(Editor
PRIVATE
main.cpp)
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Asset.h Asset.h
Asset.cpp Asset.cpp
AssetRegistry.h AssetRegistry.h
+2 -3
View File
@@ -1,9 +1,8 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
EngineTypes.h EngineTypes.h
MinimalEngine.h MinimalEngine.h
MinimalEngine.cpp MinimalEngine.cpp)
main.cpp)
add_subdirectory(Asset/) add_subdirectory(Asset/)
add_subdirectory(Containers/) add_subdirectory(Containers/)
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Array.h Array.h
Map.h Map.h
List.h) List.h)
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
GraphicsResources.h GraphicsResources.h
GraphicsResources.cpp GraphicsResources.cpp
GraphicsInitializer.h GraphicsInitializer.h
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
BasePass.h BasePass.h
BasePass.cpp BasePass.cpp
DepthPrepass.h DepthPrepass.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
NsightAftermathGpuCrashTracker.h NsightAftermathGpuCrashTracker.h
NsightAftermathGpuCrashTracker.cpp NsightAftermathGpuCrashTracker.cpp
NsightAftermathHelpers.h NsightAftermathHelpers.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
BRDF.h BRDF.h
BRDF.cpp BRDF.cpp
MaterialAsset.h MaterialAsset.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Math.h Math.h
Matrix.h Matrix.h
Vector.h Vector.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Actor.cpp Actor.cpp
Actor.h Actor.h
CameraActor.cpp CameraActor.cpp
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Util.h Util.h
Scene.cpp Scene.cpp
Scene.h) Scene.h)
+2 -3
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
CameraComponent.h CameraComponent.h
CameraComponent.cpp CameraComponent.cpp
Component.h Component.h
@@ -9,5 +9,4 @@ target_sources(Engine
MyOtherComponent.h MyOtherComponent.h
MyOtherComponent.cpp MyOtherComponent.cpp
PrimitiveComponent.cpp PrimitiveComponent.cpp
PrimitiveComponent.h PrimitiveComponent.h)
PrimitiveUniformBufferLayout.h)
@@ -27,4 +27,10 @@ private:
friend class Scene; friend class Scene;
}; };
DEFINE_REF(PrimitiveComponent) DEFINE_REF(PrimitiveComponent)
struct PrimitiveUniformBuffer
{
Matrix4 localToWorld;
Matrix4 worldToLocal;
Vector4 actorWorldPosition;
};
} // namespace Seele } // namespace Seele
@@ -1,12 +0,0 @@
#pragma once
#include "Graphics/GraphicsResources.h"
namespace Seele
{
struct PrimitiveUniformBuffer
{
Matrix4 localToWorld;
Matrix4 worldToLocal;
Vector4 actorWorldPosition;
};
} // namespace Seele
-1
View File
@@ -1,6 +1,5 @@
#include "Scene.h" #include "Scene.h"
#include "Components/PrimitiveComponent.h" #include "Components/PrimitiveComponent.h"
#include "Components/PrimitiveUniformBufferLayout.h"
#include "Material/MaterialAsset.h" #include "Material/MaterialAsset.h"
#include "Graphics/Graphics.h" #include "Graphics/Graphics.h"
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
HorizontalLayout.h HorizontalLayout.h
HorizontalLayout.cpp HorizontalLayout.cpp
Layout.h Layout.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
Button.h Button.h
Button.cpp Button.cpp
Element.h Element.h
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine target_sources(Engine
PRIVATE PUBLIC
InspectorView.h InspectorView.h
InspectorView.cpp InspectorView.cpp
SceneView.h SceneView.h