diff --git a/CMakeLists.txt b/CMakeLists.txt index d61b3229..09de9f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ endif() option (ENABLE_LTO "Enable Link Time Optimization [default: ON]" ON) option (SFIZZ_JACK "Enable JACK stand-alone build [default: ON]" ON) -option (SFIZZ_LV2 "Enable LV2 plug-in build [default: ON]" ON) +option (SFIZZ_LV2 "Enable LV2 plug-in build [default: OFF]" OFF) option (SFIZZ_BENCHMARKS "Enable benchmarks build [default: OFF]" OFF) option (SFIZZ_TESTS "Enable tests build [default: OFF]" OFF) option (SFIZZ_SHARED "Enable shared library build [default: ON]" ON) diff --git a/README.md b/README.md index 178457c1..c0adae12 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,20 @@ ## Building +Most people will probably want the LV2 plugin with `libsndfile` built-in statically. +You can directly build it this way through Docker: +``` +wget https://raw.githubusercontent.com/sfztools/sfizz/develop/scripts/Dockerfile +wget https://raw.githubusercontent.com/sfztools/sfizz/develop/scripts/x64-linux-hidden.cmake +docker build -t sfizz . +docker cp $(docker create sfizz:latest):/tmp/sfizz/build/sfizz.lv2 . +``` +Note that the statically linked LV2 plugin is to be distributed under the LGPL license, as per the terms of the `libsndfile` library. + +### More generic builds and development + `sfizz` depends mainly on the `libsndfile` library. -The JACK client depends on the `jack` library. -To build `sfizz` you need to install both as shared libraries on the system. +To build the other `sfizz` targets you need to install both `libsndfile` and `JACK` as shared libraries on the system. In Debian-based distributions, this translates into ``` sudo apt install libjack-jackd2-dev libsndfile1-dev @@ -32,17 +43,17 @@ sudo make install ``` By default this builds and installs: -- The shared library version of sfizz +- The shared library version of sfizz with both C and C++ interfaces - The JACK client -- The LV2 plugin with system libraries dynamically loaded The JACK client client will forcefully connect to the system output, and open an event input in Jack for you to connect a midi capable software or hardware (e.g. `jack-keyboard`). Note that you can disable all targets but the LV2 plugin using ```sh -cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF .. +cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_LV2=ON .. ``` and process as before. +In this case, the LV2 plugin will load `libsndfile` dynamically from your system. ### Possible pitfalls and alternatives diff --git a/cmake/LV2Config.cmake b/cmake/LV2Config.cmake index 6dccd968..b4da252e 100644 --- a/cmake/LV2Config.cmake +++ b/cmake/LV2Config.cmake @@ -1,7 +1,7 @@ # Configuration for this plugin # TODO: generate version from git -set (LV2PLUGIN_VERSION_MINOR 0) -set (LV2PLUGIN_VERSION_MICRO 1) +set (LV2PLUGIN_VERSION_MINOR 2) +set (LV2PLUGIN_VERSION_MICRO 0) set (LV2PLUGIN_NAME "sfizz") set (LV2PLUGIN_COMMENT "SFZ sampler") set (LV2PLUGIN_URI "http://sfztools.github.io/sfizz") diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 1a1103ba..c1cd7e80 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -22,5 +22,5 @@ RUN cd /tmp \ && cd sfizz \ && mkdir build \ && cd build \ - && cmake .. -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF "-DCMAKE_TOOLCHAIN_FILE=/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-hidden -DCMAKE_BUILD_TYPE=Release -DSFIZZ_USE_VCPKG=ON\ + && cmake .. -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_LV2=ON "-DCMAKE_TOOLCHAIN_FILE=/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-hidden -DCMAKE_BUILD_TYPE=Release -DSFIZZ_USE_VCPKG=ON\ && make -j 16