Skip to content

Commit 690c45f

Browse files
committed
Deps: Fix LabSound build errors via diff patch
One more workaround added to the pile.
1 parent de2f4b6 commit 690c45f

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/cmake/LabSound.cmake b/cmake/LabSound.cmake
2+
index 82b3326e..583b1640 100644
3+
--- a/cmake/LabSound.cmake
4+
+++ b/cmake/LabSound.cmake
5+
@@ -44,9 +44,9 @@ elseif (LABSOUND_USE_RTAUDIO)
6+
)
7+
endif()
8+
9+
-option(LABSOUND_INTERNAL_LIBSAMPLERATE, "Use internal libsamplerate", ON)
10+
+option(LABSOUND_INTERNAL_LIBSAMPLERATE "Use internal libsamplerate" ON)
11+
if (LABSOUND_INTERNAL_LIBSAMPLERATE)
12+
- set(LABSOUND_LSR "${LABSOUND_ROOT}/src/internal/src/samplerate.c")
13+
+ set(LABSOUND_LSR "${LABSOUND_ROOT}/src/internal/src/libSampleRate.c")
14+
else()
15+
find_package(libsamplerate)
16+
if (NOT libsamplerate_FOUND)

deps/labsound-unixbuild.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ OUT_DIR=$(pwd)/ninjabuild-unix
66
SRC_DIR=$(pwd)/deps/LabSound/LabSound
77
BUILD_DIR=$SRC_DIR/cmakebuild-unix
88

9+
cleanup() {
10+
echo "Reverting CMakeLists patch (to make sure the build is idempotent)"
11+
cd $SRC_DIR
12+
git apply -R ../cmakebuild-fixup.diff
13+
cd -
14+
}
15+
16+
trap cleanup EXIT
17+
18+
echo "Applying CMakeLists patch (this should hopefully be temporary)"
19+
cd $SRC_DIR
20+
git apply ../cmakebuild-fixup.diff
21+
cd -
22+
923
cmake -S $SRC_DIR -B $BUILD_DIR -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-fpermissive -DCMAKE_CXX_COMPILER=g++ -DLABSOUND_USE_MINIAUDIO=OFF -DLABSOUND_USE_RTAUDIO=ON
1024
cmake --build $BUILD_DIR --clean-first --config Release
1125

deps/labsound-windowsbuild.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ OUT_DIR=$(pwd)/ninjabuild-windows
66
SRC_DIR=$(pwd)/deps/LabSound/LabSound
77
BUILD_DIR=$SRC_DIR/cmakebuild-windows
88

9+
cleanup() {
10+
echo "Reverting CMakeLists patch (to make sure the build is idempotent)"
11+
cd $SRC_DIR
12+
git apply -R ../cmakebuild-fixup.diff
13+
cd -
14+
}
15+
16+
trap cleanup EXIT
17+
18+
echo "Applying CMakeLists patch (this should hopefully be temporary)"
19+
cd $SRC_DIR
20+
git apply ../cmakebuild-fixup.diff
21+
cd -
22+
923
cmake -S $SRC_DIR -B $BUILD_DIR -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-fpermissive -DCMAKE_CXX_COMPILER=g++ -DLABSOUND_USE_MINIAUDIO=OFF -DLABSOUND_USE_RTAUDIO=ON
1024
cmake --build $BUILD_DIR --clean-first --config Release
1125

0 commit comments

Comments
 (0)