diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f2c46a..c1be4f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,3 +26,4 @@ endif() add_subdirectory(${PROJECT_SOURCE_DIR}/lib) add_subdirectory(${PROJECT_SOURCE_DIR}/src) +add_subdirectory(${PROJECT_SOURCE_DIR}/apps) diff --git a/src/bin/CMakeLists.txt b/apps/CMakeLists.txt similarity index 100% rename from src/bin/CMakeLists.txt rename to apps/CMakeLists.txt diff --git a/src/bin/fall-fever/CMakeLists.txt b/apps/fall-fever/CMakeLists.txt similarity index 100% rename from src/bin/fall-fever/CMakeLists.txt rename to apps/fall-fever/CMakeLists.txt diff --git a/src/bin/fall-fever/controller.cpp b/apps/fall-fever/controller.cpp similarity index 100% rename from src/bin/fall-fever/controller.cpp rename to apps/fall-fever/controller.cpp diff --git a/src/bin/fall-fever/controller.h b/apps/fall-fever/controller.h similarity index 100% rename from src/bin/fall-fever/controller.h rename to apps/fall-fever/controller.h diff --git a/src/bin/fall-fever/debug.cpp b/apps/fall-fever/debug.cpp similarity index 100% rename from src/bin/fall-fever/debug.cpp rename to apps/fall-fever/debug.cpp diff --git a/src/bin/fall-fever/flycam.cpp b/apps/fall-fever/flycam.cpp similarity index 100% rename from src/bin/fall-fever/flycam.cpp rename to apps/fall-fever/flycam.cpp diff --git a/src/bin/fall-fever/flycam.h b/apps/fall-fever/flycam.h similarity index 100% rename from src/bin/fall-fever/flycam.h rename to apps/fall-fever/flycam.h diff --git a/src/bin/fall-fever/main.cpp b/apps/fall-fever/main.cpp similarity index 100% rename from src/bin/fall-fever/main.cpp rename to apps/fall-fever/main.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1d235e1..1b0c4de 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,2 +1,35 @@ -add_subdirectory(lib) -add_subdirectory(bin) +add_library(fever_core + components/transform.cpp + core/application.cpp + core/camera.cpp + core/glad.cpp + core/graphics/framebuffer.cpp + core/graphics/image.cpp + core/graphics/material.cpp + core/graphics/mesh.cpp + core/light.cpp + core/render.cpp + core/shader.cpp + core/time.cpp + input/input.cpp + scene/gltf.cpp + scene/gltf_loader.cpp + util/log.cpp + window/window.cpp +) + +target_compile_features(fever_core PUBLIC cxx_std_20) +target_include_directories(fever_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + +target_link_libraries( + fever_core PUBLIC + glad + glfw + EnTT::EnTT + pthread + spdlog + glm::glm + fx-gltf::fx-gltf + nlohmann_json::nlohmann_json + stb +) diff --git a/src/lib/components/color.h b/src/components/color.h similarity index 100% rename from src/lib/components/color.h rename to src/components/color.h diff --git a/src/lib/components/name.h b/src/components/name.h similarity index 100% rename from src/lib/components/name.h rename to src/components/name.h diff --git a/src/lib/components/relationship.h b/src/components/relationship.h similarity index 100% rename from src/lib/components/relationship.h rename to src/components/relationship.h diff --git a/src/lib/components/transform.cpp b/src/components/transform.cpp similarity index 100% rename from src/lib/components/transform.cpp rename to src/components/transform.cpp diff --git a/src/lib/components/transform.h b/src/components/transform.h similarity index 100% rename from src/lib/components/transform.h rename to src/components/transform.h diff --git a/src/lib/core/application.cpp b/src/core/application.cpp similarity index 100% rename from src/lib/core/application.cpp rename to src/core/application.cpp diff --git a/src/lib/core/application.h b/src/core/application.h similarity index 100% rename from src/lib/core/application.h rename to src/core/application.h diff --git a/src/lib/core/camera.cpp b/src/core/camera.cpp similarity index 100% rename from src/lib/core/camera.cpp rename to src/core/camera.cpp diff --git a/src/lib/core/camera.h b/src/core/camera.h similarity index 100% rename from src/lib/core/camera.h rename to src/core/camera.h diff --git a/src/lib/core/glad.cpp b/src/core/glad.cpp similarity index 100% rename from src/lib/core/glad.cpp rename to src/core/glad.cpp diff --git a/src/lib/core/glad.h b/src/core/glad.h similarity index 100% rename from src/lib/core/glad.h rename to src/core/glad.h diff --git a/src/lib/core/graphics/framebuffer.cpp b/src/core/graphics/framebuffer.cpp similarity index 100% rename from src/lib/core/graphics/framebuffer.cpp rename to src/core/graphics/framebuffer.cpp diff --git a/src/lib/core/graphics/framebuffer.h b/src/core/graphics/framebuffer.h similarity index 100% rename from src/lib/core/graphics/framebuffer.h rename to src/core/graphics/framebuffer.h diff --git a/src/lib/core/graphics/image.cpp b/src/core/graphics/image.cpp similarity index 100% rename from src/lib/core/graphics/image.cpp rename to src/core/graphics/image.cpp diff --git a/src/lib/core/graphics/image.h b/src/core/graphics/image.h similarity index 100% rename from src/lib/core/graphics/image.h rename to src/core/graphics/image.h diff --git a/src/lib/core/graphics/material.cpp b/src/core/graphics/material.cpp similarity index 100% rename from src/lib/core/graphics/material.cpp rename to src/core/graphics/material.cpp diff --git a/src/lib/core/graphics/material.h b/src/core/graphics/material.h similarity index 100% rename from src/lib/core/graphics/material.h rename to src/core/graphics/material.h diff --git a/src/lib/core/graphics/mesh.cpp b/src/core/graphics/mesh.cpp similarity index 100% rename from src/lib/core/graphics/mesh.cpp rename to src/core/graphics/mesh.cpp diff --git a/src/lib/core/graphics/mesh.h b/src/core/graphics/mesh.h similarity index 100% rename from src/lib/core/graphics/mesh.h rename to src/core/graphics/mesh.h diff --git a/src/lib/core/light.cpp b/src/core/light.cpp similarity index 100% rename from src/lib/core/light.cpp rename to src/core/light.cpp diff --git a/src/lib/core/light.h b/src/core/light.h similarity index 100% rename from src/lib/core/light.h rename to src/core/light.h diff --git a/src/lib/core/render.cpp b/src/core/render.cpp similarity index 100% rename from src/lib/core/render.cpp rename to src/core/render.cpp diff --git a/src/lib/core/render.h b/src/core/render.h similarity index 100% rename from src/lib/core/render.h rename to src/core/render.h diff --git a/src/lib/core/shader.cpp b/src/core/shader.cpp similarity index 100% rename from src/lib/core/shader.cpp rename to src/core/shader.cpp diff --git a/src/lib/core/shader.h b/src/core/shader.h similarity index 100% rename from src/lib/core/shader.h rename to src/core/shader.h diff --git a/src/lib/core/time.cpp b/src/core/time.cpp similarity index 100% rename from src/lib/core/time.cpp rename to src/core/time.cpp diff --git a/src/lib/core/time.h b/src/core/time.h similarity index 100% rename from src/lib/core/time.h rename to src/core/time.h diff --git a/src/lib/input/input.cpp b/src/input/input.cpp similarity index 100% rename from src/lib/input/input.cpp rename to src/input/input.cpp diff --git a/src/lib/input/input.h b/src/input/input.h similarity index 100% rename from src/lib/input/input.h rename to src/input/input.h diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt deleted file mode 100644 index 1b0c4de..0000000 --- a/src/lib/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -add_library(fever_core - components/transform.cpp - core/application.cpp - core/camera.cpp - core/glad.cpp - core/graphics/framebuffer.cpp - core/graphics/image.cpp - core/graphics/material.cpp - core/graphics/mesh.cpp - core/light.cpp - core/render.cpp - core/shader.cpp - core/time.cpp - input/input.cpp - scene/gltf.cpp - scene/gltf_loader.cpp - util/log.cpp - window/window.cpp -) - -target_compile_features(fever_core PUBLIC cxx_std_20) -target_include_directories(fever_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - -target_link_libraries( - fever_core PUBLIC - glad - glfw - EnTT::EnTT - pthread - spdlog - glm::glm - fx-gltf::fx-gltf - nlohmann_json::nlohmann_json - stb -) diff --git a/src/lib/post_processing/post_processing.cpp b/src/post_processing/post_processing.cpp similarity index 100% rename from src/lib/post_processing/post_processing.cpp rename to src/post_processing/post_processing.cpp diff --git a/src/lib/post_processing/post_processing.h b/src/post_processing/post_processing.h similarity index 100% rename from src/lib/post_processing/post_processing.h rename to src/post_processing/post_processing.h diff --git a/src/lib/scene/gltf.cpp b/src/scene/gltf.cpp similarity index 100% rename from src/lib/scene/gltf.cpp rename to src/scene/gltf.cpp diff --git a/src/lib/scene/gltf.h b/src/scene/gltf.h similarity index 100% rename from src/lib/scene/gltf.h rename to src/scene/gltf.h diff --git a/src/lib/scene/gltf_loader.cpp b/src/scene/gltf_loader.cpp similarity index 100% rename from src/lib/scene/gltf_loader.cpp rename to src/scene/gltf_loader.cpp diff --git a/src/lib/scene/gltf_loader.h b/src/scene/gltf_loader.h similarity index 100% rename from src/lib/scene/gltf_loader.h rename to src/scene/gltf_loader.h diff --git a/src/lib/scene/scene.cpp b/src/scene/scene.cpp similarity index 100% rename from src/lib/scene/scene.cpp rename to src/scene/scene.cpp diff --git a/src/lib/scene/scene.h b/src/scene/scene.h similarity index 100% rename from src/lib/scene/scene.h rename to src/scene/scene.h diff --git a/src/lib/util/log.cpp b/src/util/log.cpp similarity index 100% rename from src/lib/util/log.cpp rename to src/util/log.cpp diff --git a/src/lib/util/log.h b/src/util/log.h similarity index 100% rename from src/lib/util/log.h rename to src/util/log.h diff --git a/src/lib/window/window.cpp b/src/window/window.cpp similarity index 100% rename from src/lib/window/window.cpp rename to src/window/window.cpp diff --git a/src/lib/window/window.h b/src/window/window.h similarity index 100% rename from src/lib/window/window.h rename to src/window/window.h