mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 04:50:05 -07:00
FetchContent miniaudio
This commit is contained in:
parent
8b252a5c85
commit
5bca9702d5
6 changed files with 12 additions and 8 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -7,6 +7,3 @@
|
||||||
[submodule "OTRExporter"]
|
[submodule "OTRExporter"]
|
||||||
path = OTRExporter
|
path = OTRExporter
|
||||||
url = https://github.com/harbourmasters/OTRExporter
|
url = https://github.com/harbourmasters/OTRExporter
|
||||||
[submodule "miniaudio"]
|
|
||||||
path = soh/include/miniaudio
|
|
||||||
url = https://github.com/mackron/miniaudio
|
|
||||||
|
|
|
@ -36,8 +36,7 @@ if (-not (Test-Path $clangFormatFilePath) -or ($currentVersion -ne $requiredVers
|
||||||
|
|
||||||
$basePath = (Resolve-Path .).Path
|
$basePath = (Resolve-Path .).Path
|
||||||
$files = Get-ChildItem -Path $basePath\soh -Recurse -File `
|
$files = Get-ChildItem -Path $basePath\soh -Recurse -File `
|
||||||
| Where-Object { (-not ($_.FullName -like "*\soh\include\miniaudio*")) -and `
|
| Where-Object { ($_.Extension -eq '.c' -or $_.Extension -eq '.cpp' -or `
|
||||||
($_.Extension -eq '.c' -or $_.Extension -eq '.cpp' -or `
|
|
||||||
(($_.Extension -eq '.h' -or $_.Extension -eq '.hpp') -and `
|
(($_.Extension -eq '.h' -or $_.Extension -eq '.hpp') -and `
|
||||||
(-not ($_.FullName -like "*\soh\src\*" -or $_.FullName -like "*\soh\include\*")))) -and `
|
(-not ($_.FullName -like "*\soh\src\*" -or $_.FullName -like "*\soh\include\*")))) -and `
|
||||||
(-not ($_.FullName -like "*\soh\assets\*" -or $_.FullName -like "*\soh\build\*")) }
|
(-not ($_.FullName -like "*\soh\assets\*" -or $_.FullName -like "*\soh\build\*")) }
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
# and pass it as an argument to clang-format
|
# and pass it as an argument to clang-format
|
||||||
# verbose to print files being formatted and X out of Y status
|
# 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
|
||||||
|
|
|
@ -299,6 +299,14 @@ FetchContent_Declare(
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(dr_libs)
|
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)
|
find_package(SDL2)
|
||||||
set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS})
|
set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
@ -354,6 +362,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
|
||||||
${SDL2-NET-INCLUDE}
|
${SDL2-NET-INCLUDE}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/assets/
|
${CMAKE_CURRENT_SOURCE_DIR}/assets/
|
||||||
${dr_libs_SOURCE_DIR}
|
${dr_libs_SOURCE_DIR}
|
||||||
|
${miniaudio_SOURCE_DIR}
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 350784a9467a79d0fa65802132668e5afbcf3777
|
|
|
@ -6,4 +6,4 @@
|
||||||
#define MA_NO_GENERATION
|
#define MA_NO_GENERATION
|
||||||
#define MA_NO_STDIO
|
#define MA_NO_STDIO
|
||||||
#define MA_ENABLE_ONLY_SPECIFIC_BACKENDS
|
#define MA_ENABLE_ONLY_SPECIFIC_BACKENDS
|
||||||
#include "miniaudio/miniaudio.h"
|
#include <miniaudio.h>
|
Loading…
Add table
Add a link
Reference in a new issue