diff --git a/.gitmodules b/.gitmodules index 1a4f40487..7098d9d08 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,3 @@ [submodule "OTRExporter"] path = OTRExporter url = https://github.com/harbourmasters/OTRExporter -[submodule "miniaudio"] - path = soh/include/miniaudio - url = https://github.com/mackron/miniaudio diff --git a/run-clang-format.ps1 b/run-clang-format.ps1 index 35cacfb73..063cec7af 100644 --- a/run-clang-format.ps1 +++ b/run-clang-format.ps1 @@ -36,8 +36,7 @@ if (-not (Test-Path $clangFormatFilePath) -or ($currentVersion -ne $requiredVers $basePath = (Resolve-Path .).Path $files = Get-ChildItem -Path $basePath\soh -Recurse -File ` - | Where-Object { (-not ($_.FullName -like "*\soh\include\miniaudio*")) -and ` - ($_.Extension -eq '.c' -or $_.Extension -eq '.cpp' -or ` + | Where-Object { ($_.Extension -eq '.c' -or $_.Extension -eq '.cpp' -or ` (($_.Extension -eq '.h' -or $_.Extension -eq '.hpp') -and ` (-not ($_.FullName -like "*\soh\src\*" -or $_.FullName -like "*\soh\include\*")))) -and ` (-not ($_.FullName -like "*\soh\assets\*" -or $_.FullName -like "*\soh\build\*")) } diff --git a/run-clang-format.sh b/run-clang-format.sh index 0ee4126a4..20129e63d 100755 --- a/run-clang-format.sh +++ b/run-clang-format.sh @@ -26,4 +26,4 @@ # and pass it as an argument to clang-format # verbose to print files being formatted and X out of Y status -find soh -type f \( ! -path "soh/include/miniaudio/*" -a \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" \) \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose +find soh -type f \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index a76c245e6..b2541f9b0 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -299,6 +299,14 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(dr_libs) +FetchContent_Declare( + miniaudio + GIT_REPOSITORY https://github.com/mackron/miniaudio.git + GIT_TAG 350784a9467a79d0fa65802132668e5afbcf3777 + SOURCE_SUBDIR "ignore CMakeLists.txt" +) +FetchContent_MakeAvailable(miniaudio) + find_package(SDL2) set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS}) @@ -354,6 +362,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets ${SDL2-NET-INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/assets/ ${dr_libs_SOURCE_DIR} + ${miniaudio_SOURCE_DIR} . ) diff --git a/soh/include/miniaudio b/soh/include/miniaudio deleted file mode 160000 index 350784a94..000000000 --- a/soh/include/miniaudio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 350784a9467a79d0fa65802132668e5afbcf3777 diff --git a/soh/soh/Enhancements/audio/miniaudio.h b/soh/soh/Enhancements/audio/miniaudio.h index 4c7e80aef..c674da3f4 100644 --- a/soh/soh/Enhancements/audio/miniaudio.h +++ b/soh/soh/Enhancements/audio/miniaudio.h @@ -6,4 +6,4 @@ #define MA_NO_GENERATION #define MA_NO_STDIO #define MA_ENABLE_ONLY_SPECIFIC_BACKENDS -#include "miniaudio/miniaudio.h" \ No newline at end of file +#include \ No newline at end of file