Skip to content

Commit

Permalink
Merge branch 'main' into JoshUpdateBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
SpinnerX authored Nov 23, 2024
2 parents b9509c7 + cd5c380 commit 5d76b38
Show file tree
Hide file tree
Showing 40 changed files with 1,576 additions and 509 deletions.
29 changes: 3 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,6 @@ project(engine3d CXX)
set(CMAKE_CXX_STANDARD 23)
set(ENGINE_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/engine3d)

cmake_minimum_required(VERSION 3.25)
project(engine3d C CXX)

set(CMAKE_CXX_STANDARD 23)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") # works (in creating the compile_commands.json file)

add_subdirectory(Editor)
add_subdirectory(TestApp)
add_subdirectory(src)

# # target_include_directory is setting some private settings for differentiating what internal includes are privates and what should be includes should be exposed to the application-dev
target_include_directories(${PROJECT_NAME} PUBLIC ${JoltPhysics_SOURCE_DIR} ${EnTT_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE engine3d/ engine3d/Core)
target_include_directories(${PROJECT_NAME} PUBLIC ${GLM_INCLUDE_DIR} ./engine3d)

# #Set Compiler definitions
set(is_msvc_cl $<CXX_COMPILER_ID:MSVC>)
set(dev_definitions
$<${is_msvc_cl}:JPH_FLOATING_POINT_EXCEPTIONS_ENABLED>
JPH_PROFILE_ENABLED
JPH_DEBUG_RENDERER
JPH_OBJECT_STREAM
)

target_compile_definitions(${PROJECT_NAME} PRIVATE ${dev_definitions})
build_library(
DIRECTORIES src Editor TestApp
)
49 changes: 5 additions & 44 deletions Editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,12 @@ project(Editor CXX)
# Editor/Editor.cpp
# )

set(
all_src
build_demos(
SOURCES
Editor/Editor.hpp
Editor/Editor.cpp
)

add_executable(${PROJECT_NAME} ${all_src})

find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)

find_package(Vulkan REQUIRED)
find_package(VulkanHeaders REQUIRED)

if(LINUX)
find_package(VulkanLoader REQUIRED)
endif(LINUX)

# target_include_directories(${PROJECT_NAME} PUBLIC ${ENGINE_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ../)
find_package(glm REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(imguidocking REQUIRED)
find_package(box2d REQUIRED)
find_package(joltphysics REQUIRED)
find_package(EnTT REQUIRED)


target_link_libraries(
${PROJECT_NAME}
PRIVATE
glfw
${OPENGL_LIBRARIES}
Vulkan::Vulkan
vulkan-headers::vulkan-headers
glm::glm
fmt::fmt
spdlog::spdlog
yaml-cpp::yaml-cpp
imguidocking::imguidocking
box2d::box2d
Jolt::Jolt
EnTT::EnTT
engine3d
Editor/EditorScene.hpp
Editor/EditorScene.cpp
LINK_LIBRARIES engine3d
)

Loading

0 comments on commit 5d76b38

Please sign in to comment.