2026-04-29 00:17:00 -04:00
|
|
|
cmake_minimum_required(VERSION 4.1)
|
2026-05-04 00:41:34 -04:00
|
|
|
project(b_engine VERSION 0.0.2 LANGUAGES CXX C)
|
2026-04-29 00:17:00 -04:00
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
|
|
|
|
|
|
set (GLAD_SOURCE_DIR _ThirdParty/glad/src)
|
|
|
|
|
set (GLAD_INCLUDE_DIR _ThirdParty/glad/include)
|
|
|
|
|
include_directories(${GLAD_INCLUDE_DIR})
|
|
|
|
|
|
2026-05-01 20:06:54 -05:00
|
|
|
set (GLFW_BUILD_EXAMPLES OFF)
|
|
|
|
|
set (GLFW_BUILD_TESTS OFF)
|
|
|
|
|
set (GLFW_BUILD_DOCS OFF)
|
2026-04-29 00:17:00 -04:00
|
|
|
add_subdirectory(_ThirdParty/glfw)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(_ThirdParty/spdlog)
|
|
|
|
|
|
2026-05-01 20:06:54 -05:00
|
|
|
set (ASSIMP_INSTALL OFF)
|
|
|
|
|
add_subdirectory(_ThirdParty/assimp)
|
|
|
|
|
|
2026-05-08 23:44:20 -04:00
|
|
|
add_subdirectory(_ThirdParty/glm)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(_ThirdParty/entt)
|
2026-05-01 20:06:54 -05:00
|
|
|
|
2026-05-02 21:24:21 -04:00
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
|
src/main.cpp
|
|
|
|
|
${GLAD_SOURCE_DIR}/gl.c
|
2026-04-29 00:17:00 -04:00
|
|
|
src/Mesh.cpp
|
2026-05-01 20:06:54 -05:00
|
|
|
src/Mesh.h
|
|
|
|
|
src/Model.h
|
|
|
|
|
src/Material.h
|
2026-05-04 00:41:34 -04:00
|
|
|
src/ModelManager.cpp
|
|
|
|
|
src/ModelManager.h
|
2026-05-01 20:06:54 -05:00
|
|
|
src/ShaderProgram.cpp
|
|
|
|
|
src/ShaderProgram.h
|
2026-05-02 21:24:21 -04:00
|
|
|
src/Texture.h
|
2026-05-04 00:41:34 -04:00
|
|
|
src/TextureManager.cpp
|
|
|
|
|
src/TextureManager.h
|
2026-05-03 12:43:39 -04:00
|
|
|
src/ShaderManager.cpp
|
2026-05-04 00:41:34 -04:00
|
|
|
src/ShaderManager.h
|
|
|
|
|
src/FreeCamera.cpp
|
|
|
|
|
src/FreeCamera.h
|
|
|
|
|
src/InputManager.cpp
|
2026-05-08 23:44:20 -04:00
|
|
|
src/InputManager.h
|
|
|
|
|
src/Components.h
|
|
|
|
|
src/Scene.cpp
|
|
|
|
|
src/Scene.h)
|
2026-05-04 00:41:34 -04:00
|
|
|
|
|
|
|
|
add_custom_target(copy_resources
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/resources"
|
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/resources"
|
|
|
|
|
COMMENT "Copying resources..."
|
|
|
|
|
)
|
2026-05-01 20:06:54 -05:00
|
|
|
|
2026-05-08 23:44:20 -04:00
|
|
|
target_link_libraries(${PROJECT_NAME} glfw spdlog assimp glm EnTT)
|
2026-05-01 20:06:54 -05:00
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${ASSIMP_INCLUDE_INSTALL_DIR})
|