feat: add audio system

This commit is contained in:
2026-10-23 22:07:52 +02:00
parent a3d3da4a67
commit 0b7cc38543
28 changed files with 7412 additions and 214 deletions
+20
View File
@@ -36,7 +36,12 @@ set(SRC_FILES
"src/Event.cpp"
"src/Window.cpp"
"src/Audio/AudioDecoder.cpp"
"src/Audio/AudioSystem.cpp"
"src/Components/Animator.cpp"
"src/Components/AudioListener.cpp"
"src/Components/AudioSource.cpp"
"src/Components/CameraComponent.cpp"
"src/Components/LightComponent.cpp"
"src/Components/MeshRendererComponent.cpp"
@@ -172,6 +177,8 @@ target_link_libraries(destrum
PRIVATE
freetype::freetype
tinyexr
OpenAL::OpenAL
stb::vorbis
)
target_compile_definitions(destrum
@@ -272,6 +279,19 @@ function(destrum_cook_engine_assets GAME_TARGET GAME_OUTPUT_DIR)
install(DIRECTORY "${_engine_runtime}/" DESTINATION "bin/assets/engine")
endfunction()
# OpenAL is a DLL, every exe that links the engine needs a copy next to it
function(destrum_copy_runtime_dlls TARGET)
if (WIN32)
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_RUNTIME_DLLS:${TARGET}> $<TARGET_FILE_DIR:${TARGET}>
COMMAND_EXPAND_LISTS
)
endif()
endfunction()
install(FILES $<TARGET_FILE:OpenAL::OpenAL> DESTINATION bin)
install(TARGETS destrum destrum_assets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib