From 1938b962408eeb6f6b3ac22c75450b4d7cf9785d Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 5 Jan 2020 00:44:37 +0100 Subject: [PATCH] Added README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 7e69b2b4..43cbdfdb 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,29 @@ git submodule update --init --recursive ``` You can build with `clang`, although in that case the CMakeFile defaults to using `libc++` instead of `libstdc++`. + +### Building with MSVC on windows + +The simplest is to use `vcpkg` as a package manager, which will give you access to `libsndfile`. +```sh +PS> git clone https://github.com/Microsoft/vcpkg.git +PS> cd vcpkg +PS> .\bootstrap-vcpkg.bat +PS> .\vcpkg integrate install +PS> .\vcpkg integrate powershell +``` + +Assuming you want to build for x64, install the relevant packages as follows +```sh +PS> .\vcpkg.exe install libsndfile:x64-windows zlib:x64-windows libsamplerate:x64-windows +``` + +In the sfizz source directory, you can then build with CMake as usual, although you should clone the windows branch: +```sh +git clone --branch windows --recursive https://github.com/sfztools/sfizz.git +cd sfizz +mkdir build && cd build +cmake .. -DSFIZZ_JACK=OFF "-DCMAKE_TOOLCHAIN_FILE=C:\Users\Paul\source\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows +cmake --build . -j 16 --config Release +``` +