From 66052a9ef727481de22c9a1aecee8773548f6bef Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sat, 18 Jan 2020 17:43:46 +0100 Subject: [PATCH] Windows builds libsndfile as static --- README.md | 4 ++-- cmake/SfizzConfig.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00491979..f80de21d 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ cd vcpkg Assuming you want to build for x64, install the relevant packages as follows ```powershell -.\vcpkg.exe install libsndfile:x64-windows zlib:x64-windows libsamplerate:x64-windows +.\vcpkg.exe install libsndfile:x64-windows-static zlib:x64-windows-static libsamplerate:x64-windows-static ``` In the sfizz source directory, you can then build with CMake as usual, although you should clone the windows branch: @@ -73,7 +73,7 @@ git clone --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 .. -DSFIZZ_JACK=OFF "-DCMAKE_TOOLCHAIN_FILE=C:\Users\Paul\source\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static cmake --build . -j 16 --config Release ``` diff --git a/cmake/SfizzConfig.cmake b/cmake/SfizzConfig.cmake index 252579a0..24e3fa82 100644 --- a/cmake/SfizzConfig.cmake +++ b/cmake/SfizzConfig.cmake @@ -30,7 +30,7 @@ endif() function(SFIZZ_LINK_LIBSNDFILE TARGET) if (WIN32) - target_link_libraries (${TARGET} PRIVATE sndfile-shared) + target_link_libraries (${TARGET} PRIVATE sndfile-static) target_include_directories(${TARGET} PRIVATE ${SNDFILE_INCLUDE_DIR}) else() target_link_libraries(${TARGET} PRIVATE sndfile)