Skip to content

Commit

Permalink
README.md: Add description of configuring SRC dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
norihiro committed Dec 26, 2023
1 parent b8eeb3c commit 669fe65
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,40 @@ Recommended setting for each source type is listed below.
## Build and install
### Linux
Install `libsamplerate`. Use `apt` as below on Ubuntu-22.04.
```shell
sudo apt install libsamplerate0 libsamplerate0-dev
```

Use cmake to build on Linux. After checkout, run these commands.
The flags `-D USE_ERIKD_LIBSAMPLERATE_DEPS=OFF -D USE_ERIKD_LIBSAMPLERATE_SYSTEM=ON` are optional
but recommended to ensure `libsamplerate` from the system will be linked.
```shell
mkdir build && cd build
cmake \
-D CMAKE_INSTALL_PREFIX=/usr \
-D USE_ERIKD_LIBSAMPLERATE_DEPS=OFF \
-D USE_ERIKD_LIBSAMPLERATE_SYSTEM=ON \
..
make
sudo make install
```
sed -i 's;${CMAKE_INSTALL_FULL_LIBDIR};/usr/lib;' CMakeLists.txt

If you prefer `libswresample` instead of `libsamplerate`, configure with these flags.
```shell
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
cmake \
-D CMAKE_INSTALL_PREFIX=/usr \
-D USE_ERIKD_LIBSAMPLERATE_DEPS=OFF \
-D USE_ERIKD_LIBSAMPLERATE_SYSTEM=OFF \
-D USE_FFMPEG_SWRESAMPLE=ON \
..
make
sudo make install
```

### macOS
Use cmake to build on Linux. After checkout, run these commands.
Use cmake to build on macOS. After checkout with a submodule, run these commands.
```
mkdir build && cd build
cmake ..
Expand Down

0 comments on commit 669fe65

Please sign in to comment.