Skip to content

Commit

Permalink
chore: normalise namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tomezpl committed Nov 21, 2023
1 parent 70f0da4 commit e5e0968
Show file tree
Hide file tree
Showing 60 changed files with 282 additions and 660 deletions.
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"cmake.configureOnOpen": false,
"cmake.configureArgs": [
"--toolchain ${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
]
],
"files.associations": {
"xiosbase": "cpp",
"string": "cpp"
},
"dotnet.defaultSolution": "disable"
}
11 changes: 11 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
"isDefault": true
},
"detail": "Task generated by Debugger."
},
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": [
"ALL_BUILD"
],
"group": "build",
"problemMatcher": [],
"detail": "CMake template build task"
}
],
"version": "2.0.0"
Expand Down
57 changes: 29 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ cmake_print_variables(VCPKG_INCLUDE_PATH)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)

# Engine source root
set(LEPUS_SRC_DIR ${CMAKE_SOURCE_DIR}/src/lepus)

# Engine-wide include directories
include_directories(${CMAKE_SOURCE_DIR}/include src ${CMAKE_SOURCE_DIR}/3rdparty)
include_directories(${VCPKG_INCLUDE_PATH})
Expand All @@ -64,56 +67,54 @@ add_library(DearImgui ${IMGUI_SRC})
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/imgui)

# Demo executable
add_executable(LepusDemo src/LDemo/main.cpp)
add_executable(LepusDemo src/examples/demo/main.cpp)

# LepusUtility
file(GLOB_RECURSE LEPUSUTILITY_HEADERS ${CMAKE_SOURCE_DIR}/src/LUtility/*.h ${CMAKE_SOURCE_DIR}/src/LUtility/**/*.h)
file(GLOB_RECURSE LEPUSUTILITY_HEADERS ${LEPUS_SRC_DIR}/utility/*.h ${LEPUS_SRC_DIR}/utility/**/*.h)
add_custom_target(LepusUtility SOURCES ${LEPUSUTILITY_HEADERS})
source_group(TREE ${CMAKE_SOURCE_DIR}/src/LUtility FILES ${LEPUSUTILITY_HEADERS})
source_group(TREE ${LEPUS_SRC_DIR}/utility FILES ${LEPUSUTILITY_HEADERS})

# Lepus3D shaders
# LepusGfx shaders
file(GLOB LEPUS3D_SHADERS_SRC ${CMAKE_SOURCE_DIR}/Content/GLSL/*.frag ${CMAKE_SOURCE_DIR}/Content/GLSL/*.vert)
add_custom_target(Lepus3D_Shaders SOURCES ${LEPUS3D_SHADERS_SRC})
add_custom_target(LepusGfx_Shaders SOURCES ${LEPUS3D_SHADERS_SRC})

# Lepus3D sources
file(GLOB_RECURSE Lepus3D_SRC src/L3D/*.h src/L3D/*.cpp src/L3D/**/*.h src/L3D/**/*.cpp)
list(FILTER Lepus3D_SRC EXCLUDE REGEX ".*(3rdparty)+.*")
# LepusGfx sources
file(GLOB_RECURSE LepusGfx_SRC ${LEPUS_SRC_DIR}/gfx/*.h ${LEPUS_SRC_DIR}/gfx/*.cpp ${LEPUS_SRC_DIR}/gfx/**/*.h ${LEPUS_SRC_DIR}/gfx/**/*.cpp)
list(FILTER LepusGfx_SRC EXCLUDE REGEX ".*(3rdparty)+.*")

add_library(Lepus3D ${Lepus3D_SRC})
source_group(TREE ${CMAKE_SOURCE_DIR}/src/L3D FILES ${Lepus3D_SRC})
add_library(LepusGfx ${LepusGfx_SRC})
source_group(TREE ${LEPUS_SRC_DIR}/gfx FILES ${LepusGfx_SRC})

# LepusEngine sources
file(GLOB_RECURSE LepusEngine_SRC src/LEngine/*.h src/LEngine/*.cpp src/LEngine/**/*.h src/LEngine/**/*.cpp)
file(GLOB_RECURSE LepusEngine_SRC ${LEPUS_SRC_DIR}/engine/*.h ${LEPUS_SRC_DIR}/engine/*.cpp ${LEPUS_SRC_DIR}/engine/**/*.h ${LEPUS_SRC_DIR}/engine/**/*.cpp)
add_library(LepusEngine ${LepusEngine_SRC})
source_group(TREE ${CMAKE_SOURCE_DIR}/src/LEngine FILES ${LepusEngine_SRC})
source_group(TREE ${LEPUS_SRC_DIR}/engine FILES ${LepusEngine_SRC})

# LepusSystem sources
file(GLOB_RECURSE LepusSystem_SRC src/LSystem/*.h src/LSystem/*.cpp src/LSystem/**/*.h src/LSystem/**/*.cpp)
file(GLOB_RECURSE LepusSystem_SRC ${LEPUS_SRC_DIR}/system/*.h ${LEPUS_SRC_DIR}/system/*.cpp ${LEPUS_SRC_DIR}/system/**/*.h ${LEPUS_SRC_DIR}/system/**/*.cpp)
add_library(LepusSystem ${LepusSystem_SRC})
source_group(TREE ${CMAKE_SOURCE_DIR}/src/LSystem FILES ${LepusSystem_SRC})
source_group(TREE ${LEPUS_SRC_DIR}/system FILES ${LepusSystem_SRC})

# Unit test example files
file(GLOB_RECURSE LEPUS_TESTS_CONTENT_SRC ${CMAKE_SOURCE_DIR}/tests/Content/*.* ${CMAKE_SOURCE_DIR}/tests/Content/**.*)
add_custom_target(Lepus_Tests_Content SOURCES ${LEPUS_TESTS_CONTENT_SRC})

#add_dependencies(Lepus3D)
# TODO: Get LepusEngine to build add_dependencies(Lepus3D LepusEngine LepusUtility)
add_dependencies(LepusDemo Lepus3D)
add_dependencies(LepusDemo LepusGfx)

# Dependency libraries
## Lepus3D: GL3W (core profile loading)
## LepusGfx: GL3W (core profile loading)
add_library(GL3W
3rdparty/gl3w/src/gl3w.c
)
include_directories(3rdparty/gl3w/include)
## Lepus3D: GLFW libraries
## LepusGfx: GLFW libraries
find_package(glfw3 CONFIG REQUIRED)

## Lepus3D: GLEW includes
include_directories(Lepus3D ${GLEW_INCLUDES})
## LepusGfx: GLEW includes
include_directories(LepusGfx ${GLEW_INCLUDES})

## Lepus3D: GLFW includes
include_directories(Lepus3D ${GLFW_INCLUDES})
## LepusGfx: GLFW includes
include_directories(LepusGfx ${GLFW_INCLUDES})

# LepusEngine sources
## LepusEngine: PhysX includes
Expand Down Expand Up @@ -154,8 +155,8 @@ if(OpenGL::GL)
elseif(OpenGL::OpenGL)
set(GL_LIBRARY OpenGL::OpenGL)
endif(OpenGL::GL)
target_link_libraries(Lepus3D PRIVATE GL3W glfw ${GL_LIBRARY} DearImgui LepusEngine LepusSystem)
target_link_libraries(LepusDemo PRIVATE DearImgui Lepus3D LepusEngine)
target_link_libraries(LepusGfx PRIVATE GL3W glfw ${GL_LIBRARY} DearImgui LepusEngine LepusSystem)
target_link_libraries(LepusDemo PRIVATE DearImgui LepusGfx LepusEngine)

# Copy content (models, GLSL, etc.)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Content)
Expand All @@ -175,7 +176,7 @@ FetchContent_MakeAvailable(googletest)
enable_testing()

# Unit test projects for each library
add_executable(Lepus3D_Tests
add_executable(LepusGfx_Tests
tests/L3D/GraphicsEngine/GraphicsApiTests.h
tests/L3D/GraphicsEngine/GraphicsApiTests.cpp
tests/L3D/GraphicsEngine/GraphicsApiOptionsTests.h
Expand All @@ -195,11 +196,11 @@ add_executable(LepusUtility_Tests

add_custom_command(TARGET LepusSystem_Tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/tests/Content" ${CMAKE_BINARY_DIR}/tests/Content)

target_link_libraries(Lepus3D_Tests GTest::gtest_main Lepus3D)
target_link_libraries(LepusGfx_Tests GTest::gtest_main LepusGfx)
target_link_libraries(LepusSystem_Tests GTest::gtest_main LepusSystem)
target_link_libraries(LepusUtility_Tests GTest::gtest_main)

include(GoogleTest)
gtest_discover_tests(Lepus3D_Tests)
gtest_discover_tests(LepusGfx_Tests)
gtest_discover_tests(LepusSystem_Tests)
gtest_discover_tests(LepusUtility_Tests)
3 changes: 0 additions & 3 deletions src/L3D/GraphicsEngine/GraphicsApi/GraphicsApi.cpp

This file was deleted.

55 changes: 0 additions & 55 deletions src/LEngine/ConsoleLogger.h

This file was deleted.

50 changes: 0 additions & 50 deletions src/LEngine/Entity.h

This file was deleted.

15 changes: 0 additions & 15 deletions src/LEngine/ILogger.h

This file was deleted.

14 changes: 0 additions & 14 deletions src/LEngine/ISingleton.h

This file was deleted.

44 changes: 0 additions & 44 deletions src/LEngine/Logger/ConsoleLogger.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions src/LEngine/Physics.h

This file was deleted.

Loading

0 comments on commit e5e0968

Please sign in to comment.